How to restart a timer

Guidances to solve typical issues.
Anleitungen, um typische Fragestellungen zu lösen.
Post Reply
User avatar
JonathanPotter
Posts: 3
Joined: Thu Oct 20, 2022 9:35 pm

How to restart a timer

Post by JonathanPotter » Thu Mar 02, 2023 5:17 am

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.

User avatar
MarcusZ.
Posts: 154
Joined: Sun Jan 20, 2019 4:44 pm

Re: How to restart a timer

Post by MarcusZ. » Sat Mar 04, 2023 4:48 pm

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! ;-)
2x Bridge V2 (+deCONZ/HA-Bridge)
Hue Go (+BT), Lightstrip (in/out), Play, Bloom; E14+E27 Bulb; Iris, Aura.
Motion sensor (in/out), Dimmer (old/new), Smart Button, Tap Dial.

P.S.: Ich bin *kein* Entwickler von all 4 hue, aber Hue Poweruser!

User avatar
JonathanPotter
Posts: 3
Joined: Thu Oct 20, 2022 9:35 pm

Re: How to restart a timer

Post by JonathanPotter » Sun Mar 05, 2023 8:32 pm

Ha! That is a clever idea, thank you.

Shame that Philips make things like this so difficult.

Post Reply