Add frost mode commands.

This commit is contained in:
Andrius Štikonas 2020-11-22 12:22:14 +00:00
parent 2415074907
commit bfd6738b9c
2 changed files with 16 additions and 0 deletions

View File

@ -379,3 +379,15 @@ class NeoHub:
result = await self._send(message, reply)
return result
async def frost(self, state: bool, devices: [NeoStat]):
"""
Enables or disables Frost mode
"""
names = [x.name for x in devices]
message = {"FROST_ON" if state else "FROST_OFF": names}
reply = {"result": "frost on" if state else "frost off"}
result = await self._send(message, reply)
return result

View File

@ -71,3 +71,7 @@ class NeoStat:
async def unlock(self):
result = await self._hub.unlock([self])
return result
async def frost(self, state: bool):
result = await self._hub.frost(state, [self])
return result