Page 1 of 1

How to restart a timer

Posted: Thu Mar 02, 2023 5:17 am
by JonathanPotter
Is there a way to have an action that restarts a timer that is already running?

Starting it again doesn't seem to extend the time if it's already running.

There's an option to "stop and reset", so I tried adding two actions: "stop and reset" followed by "start", and that failed with an error that multiple actions on the same resource aren't supported.

Re: How to restart a timer

Posted: Sat Mar 04, 2023 4:48 pm
by MarcusZ.
Hello,
unfortunately, since a Philips API update from a long time ago, timers cannot be restarted when running.
As a workaround, just create a (dummy) timer with 1s to start your timer again, and add it to your rule where you stop your timer.
Regards,
Marcus

P.S.: From API perspective, for Rene and the "Experts":
It would basically be possible to update the existing timer with state "enabled" AND in the *same call* set the time (again). This could also be done in a rule.
However, this is not really a restart, but an overwrite: The time in the rules is independant to the original timer value. This may lead to confusion if the timer is changed without also modifying the rule! ;-)

Re: How to restart a timer

Posted: Sun Mar 05, 2023 8:32 pm
by JonathanPotter
Ha! That is a clever idea, thank you.

Shame that Philips make things like this so difficult.