I am quite certain that there is en error in my automation, but I cannot find. Here are the details: First, I created the automation (via the web GUI) with a trigger time of 12:54 and the light turned on at 12:54, as instructed. No issue.
alias: test auto
description: ''
trigger:
- platform: time
at: '12:54:00'
condition: []
action:
- type: turn_on
device_id: 70f138e671054d4465583069b38ce0c2
entity_id: switch.testswitch
domain: switch
Then, I changed the trigger time to 12:56, added the following delay line, and the light turned on at 12:57, as instructed. No issue.
- delay:
minutes: 1
Then, I changed the trigger time to 12:58, changed the delay line as shown, but the light turned on at 12:58. This means that the delay was ignored.
At this point, I have no idea what to do because i have tried every syntax I have seen and the delay never works. What should I try??? Note that after each change, I went to Server Controls and clicked ‘Automation’ to reread the file and then Check Configuration’ to make sure that there were no problems found.
Most of the time they aren’t. the major keys don’t matter in which order they are listed. and triggers and conditions don’t matter because they are all checked.
However actions are taken in the order they are written. And if you think about it that is the only way it makes any sense.
Otherwise you couldn’t have a “switch on”, “delay”, “switch off” sequence of events and be able to define it in that order.