Hopefully this is going in the right place. I just upgraded to 57.2 and was excited about the timer option. After setting it up, however, I am getting some undesirable results.
I have an input_number, which is setup as a slider so that I can configure a timer duration for how long to have our bedroom motion detector off for.
disable_motion_timer:
name: Hours
icon: mdi:timer
initial: 2
min: 1
max: 5
step: 1
mode: slider
unit_of_measurement: Hours
I have a timer configured as:
bedroom_motion_disabled:
name: Bedroom Motion Disabled
icon: 'mdi:close-circle'
I have a script, which is:
disable_bedroom_motion:
alias: Bedroom motion off
sequence:
- service: homeassistant.turn_off
data:
entity_id: group.bedroom_lights
- service: timer.start
data:
entity_id: timer.bedroom_motion_disabled
duration: '{{ states.input_number.disable_motion_timer.state | int }}:00:00'
When I fire the script, the duration errors and says that it cannot figure out the value.
if I replace
- service: timer.start
data:
entity_id: timer.bedroom_motion_disabled
duration: '{{ states.input_number.disable_motion_timer.state | int }}:00:00'
with
- delay: '{{ states.input_number.disable_motion_timer.state | int }}:00:00'
It works. But this does not give me control over cancelling the “timer”, as it is a delay that keeps the script excecuting until delay completes. Why does it not work when setting the duration on the timer start?
Also, when displaying a timer on the front-end. It doesn’t display the timer time? As in, there is no way to see how much time is left on the timer?
Is there a way to disable the timer from the front-end, without creating another script that calls the cancel option?
Thanks for all the great work you guys do! Been with the software since like .30, and I am amazed where it is today. Love love love!!