diff --git a/neohubapi/neohub.py b/neohubapi/neohub.py index aad2fa2..e1ba46c 100644 --- a/neohubapi/neohub.py +++ b/neohubapi/neohub.py @@ -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] diff --git a/neohubapi/neostat.py b/neohubapi/neostat.py index 4c05815..283488a 100644 --- a/neohubapi/neostat.py +++ b/neohubapi/neostat.py @@ -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