Add function to set switching differential.

This commit is contained in:
Andrius Štikonas 2020-11-22 15:36:18 +00:00
parent 3af9ff2bfb
commit fc9141d168
2 changed files with 22 additions and 0 deletions

View File

@ -415,3 +415,21 @@ class NeoHub:
result = await self._send(message, reply)
return result
async def set_diff(self, switching_differential: int, devices: [NeoStat]):
"""
Sets the thermostat's switching differential
-1: Undocumented option. Seems to set differential to 204.
0: 0.5 degrees
1: 1 degree
2: 2 degrees
3: 3 degrees
"""
names = [x.name for x in devices]
message = {"SET_DIFF": [switching_differential, names]}
reply = {"result": "switching differential was set"}
result = await self._send(message, reply)
return result

View File

@ -79,3 +79,7 @@ class NeoStat:
async def set_temp(self, temperature: int):
result = await self._hub.set_temp(temperature, [self])
return result
async def set_diff(self, switching_differential: int):
result = await self._hub.set_diff(switching_differential, [self])
return result