My configuration.yaml
works fine with everything lumped into one single (fairly large) automations.yaml
file and the old classic default entry of:
automation: !include automations.yaml
I can not successfully however move everything in a tree like:
/config/configuration.yaml
/config/automations/
/config/automations/garage/garage_light_forgot_off.yaml
/config/automations/house/automation.yaml
...
Both the entries (in the configuration.yaml
) like so:
# automation: !include automations.yaml
automation: !include_dir_merge_list automations/
and…
# automation: !include automations.yaml
automation: !include_dir_list automations/
produce the error (when checking the configuration):
Error loading /etc/homeassistant/configuration.yaml: sequence entries are not allowed here
in "/etc/homeassistant/automations/garage/garage_light_forgot_off.yaml", line 5, column 17
Based on official docs and Awesome HA reference here altering such a simple config (that works when it’s in the automation.yaml
file as:
# garage_light_forgot_off.yaml
# Simply handle case where one forgets to turn off the garage light
# Automatically turn it off if it's been on for 1.5hrs
#
alias: [Garage] - Forgetful Automatic Light Off
trigger:
- platform: state
entity_id: switch.interior_garage_light
to: 'on'
for: '01:30:00'
action:
- service: switch.turn_off
data_template:
entity_id: "{{ trigger.entity_id }}"
and
# garage_light_forgot_off.yaml
# Simply handle case where one forgets to turn off the garage light
# Automatically turn it off if it's been on for 1.5hrs
#
- alias: [Garage] - Forgetful Automatic Light Off
trigger:
- platform: state
entity_id: switch.interior_garage_light
to: 'on'
for: '01:30:00'
action:
- service: switch.turn_off
data_template:
entity_id: "{{ trigger.entity_id }}"
What am i doing wrong? I get the same error in both layouts with either or combination of !include_dir_list
or !include_dir_merge_list
. I’m currently using HASS v0.117.1 if that makes a difference?
Any advice would be so much appreciated!