fix http response and ds2413 bugs

This commit is contained in:
Andrey
2021-02-18 12:07:55 +03:00
parent 7e02797be8
commit 4f8f38fde6
2 changed files with 4 additions and 3 deletions

View File

@@ -253,7 +253,7 @@ class MegaOutPort(MegaPushEntity):
return self._state == 'ON'
elif val is not None:
val = val.get("value")
if self.index is not None and self.addr is not None:
if not isinstance(val, str) and self.index is not None and self.addr is not None:
if not isinstance(val, dict):
self.mega.lg.warning(f'{self.entity_id}: {val} is not a dict')
return