diff --git a/neohub.py b/neohub.py index e5d070d..7427849 100644 --- a/neohub.py +++ b/neohub.py @@ -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 diff --git a/neostat.py b/neostat.py index 100b997..3959aae 100644 --- a/neostat.py +++ b/neostat.py @@ -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