mirror of
https://github.com/andvikt/mega_hacs.git
synced 2025-12-11 17:14:28 +05:00
add more logs on i2c update process
This commit is contained in:
@@ -530,9 +530,11 @@ class MegaD:
|
|||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
_params = tuple(params.items())
|
_params = tuple(params.items())
|
||||||
return {
|
ret = {
|
||||||
_params: await self.request(**params)
|
_params: await self.request(**params)
|
||||||
}
|
}
|
||||||
|
self.lg.debug('i2c response: %s', ret)
|
||||||
|
return ret
|
||||||
|
|
||||||
async def get_config(self, nports=37):
|
async def get_config(self, nports=37):
|
||||||
ret = defaultdict(lambda: defaultdict(list))
|
ret = defaultdict(lambda: defaultdict(list))
|
||||||
|
|||||||
@@ -110,7 +110,8 @@ class MegaI2C(MegaPushEntity):
|
|||||||
return self._device_class
|
return self._device_class
|
||||||
|
|
||||||
def state(self):
|
def state(self):
|
||||||
return self.mega.values[self._params]
|
self.lg.debug(f'get % all states: %', self._params, self.mega.values)
|
||||||
|
return self.mega.values.get(self._params)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def device_class(self):
|
def device_class(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user