#Countdown timer knob or similar
1 messages · Page 1 of 1 (latest)
you could make a script something like this: you call it with your desired delay as the field and it will turn on something delay for fed in ammount then turn it off. i used a input bool helper as an example but you can change that to a switch command or whatever you want it to do.
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.fake_switch
- delay: "{{delaytime}}"
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id: input_boolean.fake_switch
alias: Timer Test Script
description: ""
fields:
delaytime:
selector:
time: {}
name: delaytime
required: true
then its just a matter of calling the script from whatever you want
Or a timer helper and an automation that turns it on when started and off when ended. That will allow you to see time remaining as well.
i don't understand how to make an automation do something on a timer event. timers have events like timer.finished. how do i hook into that in an automation?
oh, is this correct?
automation will bec alled when the timer goes to idle, which would happen when the timer finishes
Yea. Though the documentation suggests using the timer.finish event to account for reboots if you’re entity has the restore parameter on. There is a note on this on the page I linked. Also, an example towards the bottom showing how to use the event trigger.
There should probably be a blueprint for this. Something simple would do to make it easier to get started with timers.
i see, thanks.
how can i make a fake something or other, so i can test out this timer and slider?