Add function to set switching differential.
This commit is contained in:
parent
3af9ff2bfb
commit
fc9141d168
18
neohub.py
18
neohub.py
|
@ -415,3 +415,21 @@ class NeoHub:
|
||||||
|
|
||||||
result = await self._send(message, reply)
|
result = await self._send(message, reply)
|
||||||
return result
|
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
|
||||||
|
|
|
@ -79,3 +79,7 @@ class NeoStat:
|
||||||
async def set_temp(self, temperature: int):
|
async def set_temp(self, temperature: int):
|
||||||
result = await self._hub.set_temp(temperature, [self])
|
result = await self._hub.set_temp(temperature, [self])
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
async def set_diff(self, switching_differential: int):
|
||||||
|
result = await self._hub.set_diff(switching_differential, [self])
|
||||||
|
return result
|
||||||
|
|
Loading…
Reference in New Issue