diff --git a/neohub.py b/neohub.py index a99c0e3..c17dd5e 100644 --- a/neohub.py +++ b/neohub.py @@ -379,3 +379,15 @@ class NeoHub: result = await self._send(message, reply) return result + + async def frost(self, state: bool, devices: [NeoStat]): + """ + Enables or disables Frost mode + """ + + names = [x.name for x in devices] + message = {"FROST_ON" if state else "FROST_OFF": names} + reply = {"result": "frost on" if state else "frost off"} + + result = await self._send(message, reply) + return result diff --git a/neostat.py b/neostat.py index 6b1d2b6..360b032 100644 --- a/neostat.py +++ b/neostat.py @@ -71,3 +71,7 @@ class NeoStat: async def unlock(self): result = await self._hub.unlock([self]) return result + + async def frost(self, state: bool): + result = await self._hub.frost(state, [self]) + return result