Add set_timer_hold function to netostat class.

This commit is contained in:
Andrius Štikonas 2021-01-03 13:46:03 +00:00
parent 278867c4fc
commit 27b997df37
2 changed files with 12 additions and 1 deletions

View File

@ -476,7 +476,9 @@ class NeoHub:
async def set_timer_hold(self, state: bool, minutes: int, devices: [NeoStat]):
"""
Turns the output of timeclock on or off
Turns the output of timeclock on or off for certain duration
This function works with NeoStats in timeclock mode
"""
names = [x.name for x in devices]

View File

@ -127,3 +127,12 @@ class NeoStat(SimpleNamespace):
result = await self._hub.rate_of_change([self])
roc = result[self.name]
return roc
async def set_timer_hold(self, state: bool, minutes: int):
"""
Turns the output of timeclock on or off for certain duration
Works only with NeoStats in timeclock mode
"""
result = await self._hub.set_timer_hold(state, minutes, [self])
return result