I have a question when using automation: !include_dir_list automation in configuration.yaml. I have a simple automation that when a door “sensor” is opened, I want a room light to come on for a period of time ( 7 minutes ), then turn off automatically. Using automation: !include_dir_list automation with the delay function as such:
####Turn on Garage Lights for 7 Minutes####
alias: ‘Garage_Light_On’
trigger:
platform: state
entity_id: binary_sensor.garage_door
to: ‘on’
from: ‘off’
condition:
condition: state
entity_id: sun.sun
state: ‘below_horizon’
action:
You can use multiple services for actions. The first automation should work. I would change the trigger to to: 'on' and leave it at that. Can you repost it with the same syntax you are actually using?
I deleted my comment, as I didn’t actually open the link you shared (I did just now). I didn’t know a delay could be defined directly in an automation. I only use delays in scripts.
Looking at it a little closer, you are right: we need to see the automation with proper formatting as it’s likely to be a syntax issue.