forked from andrius/neohubapi
Add set temperature command.
This commit is contained in:
parent
bfd6738b9c
commit
e07e672a42
14
neohub.py
14
neohub.py
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue