forked from andrius/neohubapi
Add set_timer_hold function to netostat class.
This commit is contained in:
parent
278867c4fc
commit
27b997df37
|
@ -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]
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue