Greetings;
I have a timer that is triggered by an automation that is fed the timer duration via an input_number slider. I would like to be able to update the duration via the slider and not have to wait for the timer to count down to zero before it takes effect. I made an automation that should be triggered by a state_change in that slider that is supposed to cancel the running timer, update to the new duration and restart the timer - but I am getting the following errors on HA restart:
Invalid config for [automation]: expected dict for dictionary value @ data['trigger'][0]['event_data']. Got None
extra keys not allowed @ data['trigger'][0]['entity_id']. Got None. (See /config/configuration.yaml, line 23). Please check the docs at https://home-assistant.io/integrations/automation/
Invalid config for [automation]: [event_type] is an invalid option for [automation]. Check: automation->trigger->0->event_type.
I have been playing with whitespace variations for well over 4 hours and am about to lose my shit. Can anyone point me in the right direction?
Here’s the automation:
- id: 'au_airex_timer_update'
alias: airEx (update timer)
trigger:
platform: state
entity_id: input_number.airex_duration
event_type: state_changed
condition:
- condition: state
entity_id: timer.air_ex_timer
state_not: "idle"
action:
# Cancel already Running Timer
- service: timer.cancel
entity_id: timer.air_ex_timer
# Start modified Timer
- service: timer.start
data_template:
entity_id: timer.air_ex_timer
duration: "{{ states.input_number.airex_cyclefreq_hours.state | int }}:{{ states.input_number.airex_cyclefreq_mins.state | int }}:00"
- delay: '00:{{ states("input_number.airex_duration") | int }}:00'
- service: switch.turn_off
entity_id: switch.air