Add frost mode commands.
This commit is contained in:
parent
2415074907
commit
bfd6738b9c
12
neohub.py
12
neohub.py
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue