I’ve managed to create a countdown timer with a couple of rules, variables and a variables device to display the actual countdown time.
What I did was:
1: create 2 variables: $timer and $timertemp
2: create a variables device with $timer
3: create a buttons device to set the timer (I’ve used fixed values of 60 minutes, 120 minutes and so on)
4: create (at least) 2 rules:
Rule 1: "when 60 minutes is pressed
then set $timer to 59 and set $timertemp to
Rule 2: "when $timertemp gets updated
and $timer is not 0 then set $timer to ($timer
-1) after 1 minute and set $timertemp to
$system-time.time after 1 minute"
Rule 1 will set the initial timer value and sets $timertemp to the actual time, this is used to make the update after every minute work. Could be any variable that automatically changes into a new unique value.
Rule 2 then checks every minute if $timertemp gets updated. If so, and if the actual answer of $timer-1 is not 0 it will update the value of $timer untill it gets to 0.
I’m pretty sure this can be done even simpler than how I’ve created this but it fits my needs.