forked from andrius/neohubapi
Fix zone rename function and expected reply checking.
This commit is contained in:
parent
c1a609f927
commit
24127f9df5
|
@ -47,7 +47,7 @@ class NeoHub:
|
|||
if expected_reply is None:
|
||||
return reply
|
||||
else:
|
||||
if reply == expected_reply:
|
||||
if reply.__dict__ == expected_reply:
|
||||
return True
|
||||
else:
|
||||
self._logger.error(f"Unexpected reply: {reply}")
|
||||
|
|
|
@ -41,11 +41,9 @@ class NeoStat:
|
|||
"""
|
||||
|
||||
message = {"ZONE_TITLE": [self.name, new_name]}
|
||||
reply = {"result": "flashing led"}
|
||||
reply = {"result": "zone renamed"}
|
||||
|
||||
result = await self._hub._send(message, reply)
|
||||
if result:
|
||||
self.name = new_name
|
||||
return result
|
||||
|
||||
async def remove(self):
|
||||
|
|
Loading…
Reference in New Issue