Add set temperature command.

This commit is contained in:
Andrius Štikonas 2020-11-22 12:30:59 +00:00
parent bfd6738b9c
commit e07e672a42
2 changed files with 18 additions and 0 deletions

View File

@ -391,3 +391,17 @@ class NeoHub:
result = await self._send(message, reply)
return result
async def set_temp(self, temperature: int, devices: [NeoStat]):
"""
Sets the thermostat's temperature
The temperature will be reset once next comfort level is reached
"""
names = [x.name for x in devices]
message = {"SET_TEMP": [temperature, names]}
reply = {"result": "temperature was set"}
result = await self._send(message, reply)
return result

View File

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