Skip to content

Commit

Permalink
refactor: PySolarmanAsync
Browse files Browse the repository at this point in the history
  • Loading branch information
davidrapan committed Dec 13, 2024
1 parent cb83da4 commit f956e7f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/solarman/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ async def disconnect(self) -> None:
self.reader = None
self.writer = None

class PySolarmanV5AsyncEthernetWrapper(PySolarmanV5AsyncWrapper):
class PySolarmanAsync(PySolarmanV5AsyncWrapper):
def __init__(self, address, serial, port, mb_slave_id):
super().__init__(address, serial, port, mb_slave_id)
self._passthrough = False
Expand Down Expand Up @@ -142,7 +142,7 @@ def __init__(self, config: ConfigurationProvider):
self.config: ConfigurationProvider = config
self.endpoint: EndPointProvider = None
self.profile: ProfileProvider = None
self.modbus: PySolarmanV5AsyncEthernetWrapper = None
self.modbus: PySolarmanAsync = None
self.device_info: dict = {}

@property
Expand All @@ -153,7 +153,7 @@ async def load(self):
try:
self.endpoint = await EndPointProvider(self.config).discover()
self.profile = ProfileProvider(self.config, self.endpoint)
self.modbus = PySolarmanV5AsyncEthernetWrapper(*self.endpoint.connection)
self.modbus = PySolarmanAsync(*self.endpoint.connection)
self.device_info = await self.profile.resolve(self.get)
_LOGGER.debug(self.device_info)
except BaseException as e:
Expand Down

0 comments on commit f956e7f

Please sign in to comment.