Hi
I have just started playing with Home Assistant and am trying to implement a timer. It should be easy but I cannot figure out what I have done wrong.
I cannot get the trigger to work, I have a card to display the timer and it counts down but nothing happens when it reaches zero. I can manually run the automation and it toggles the output, I must just be reading the documentation wrong.
any help much appreciated
Thanks
Mark
Thanks 123 Tatas
It was really late last night and I couldn’t see it! however
Its still not triggering the action, the whole sequence start timer and trigger is
Opps
Did I mention I’m really new to this?
I restarted the core and it started working. Is this something I need to do each time I make a manual change to a config file?
Thanks again
If you make create or modify automations using a text editor, after you save automations.yaml (or configuration.yaml or wherever you are storing automations) you should execute:
Configuration > Server Controls > Check Configuration
If it reports no errors, proceed to execute:
Configuration > Server Controls > Reload Automations
Now your new automation, or modified automation, is loaded into Home Assistant.
When you “restarted the core” you effectively did the same thing except it takes longer. If you create/modify automations using the Automation Editor, it performs the two steps for you the moment you save your changes.
And as a note, still, if you restart your whole HA, versus just reloading the automations yamls, timers with a set time will not allow themselves to be interrupted to continue an automation. I can’t confirm yet that reloading just the yaml will cause the same thing.
I went down a similar road recently, and that happens to me, in case you branch out to make actual timers
To explain further, here’s the code:
alias: Kitchen Light timer starts
description: Kitchen Light timer starts
trigger:
- platform: state
entity_id: group.kitchenmotion
to: 'on'
condition:
- condition: or
conditions:
- condition: time
after: '20:00'
- condition: sun
before: sunrise
action:
- service: timer.start
data: {}
target:
entity_id: timer.kitchen_light_timer
- type: turn_on
device_id: 4856f51b9d4f30ebc0d25c555496a473
entity_id: switch.kitchen_light
domain: switch
mode: single
Now, this automation runs in a certain time, and I have 2 motions sensors, in a group together. If either one is interrupted (motion detected) it restarts the timer.
When the timer runs out, the light goes off. ( another automation just to turn off light after timer ends
All this just to say what I said earlier though Total restart will not let either sensor restart the timer while running for around 24 hours.
Seeing that the root cause of the problem was incorrect syntax, please consider marking my post above with the Solution tag. It will automatically place a check-mark next to the topic’s title which signals to other users that this topic has been resolved. This helps other users find answers to similar questions. For more information refer to the guideline 21 in the FAQ.