#Countdown timer knob or similar

1 messages · Page 1 of 1 (latest)

desert gull
#

How can I make a countdown timer that will turn a fan on for an adjustable amount of time? Ideally like the wind up timers on gas stoves where you dial in 45 minutes or whatever and it counts down and rings a bell when it’s done

exotic quiver
#

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

uncut pecan
desert gull
#

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

uncut pecan
#

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.

desert gull
#

i see, thanks.

desert gull
#

how can i make a fake something or other, so i can test out this timer and slider?