Core: Commit #3783 in Dev broke the Automation platform for my configuration

Created on 14 Oct 2016  ยท  7Comments  ยท  Source: home-assistant/core

Commit #3783 on the Dev branch has prevented the HaSS service from launching for me.

I get:

"The following platforms contain invalid configuration: automation"

Repeated in the log file on service start.

This is how the automation portion of my config is constructed:

# INCLUDE DIR
automation: !include_dir_list automation
automation location-actions: !include_dir_list automation/location-actions
automation location-actions-lighting: !include_dir_list automation/location-actions/location-actions-lighting
automation location-notices: !include_dir_list automation/location-notices
automation lighting-actions: !include_dir_list automation/lighting-actions

I thought it may have been something to do with multiple inclusions, so I attempted commenting out all but the first and the service still produced the same errors.

Beyond this, I haven't had time to troubleshoot further. The issue may be specific to the use of !include_dir_list automation, or perhaps something deeper like having subfolders in your automation directory path.

Will report back more detailed information if I have time to continue investigation.

Thanks!

All 7 comments

You should only need the first line.

Do you mind posting a full tree of all files under this directory?

@tylerstraub as @kellerza mentioned - it would be good to see tree executed at the root of automation.

However, subfolders shouldn't matter here - it will simply recurse into them and pick them up as if they were all on one level, atleast that's what I saw in the tests.

@kellerza @lwis no problem! Thanks for the help!

fyi: I am currently using a pattern of creating a folder named "disabled" to store scripts that were either unused, broken or not needed to avoid deletion of work that I may build upon later. Maybe these scripts are now being passed into the compiler with the recent change?

hass@KUMA-NOOMISO:~/.homeassistant/automation$ tree
.
โ”œโ”€โ”€ disabled
โ”‚ย ย  โ”œโ”€โ”€ owntracks_refresh.yaml
โ”‚ย ย  โ””โ”€โ”€ template_test.yaml
โ”œโ”€โ”€ lighting-actions
โ”‚ย ย  โ””โ”€โ”€ disabled
โ”‚ย ย      โ”œโ”€โ”€ bedroom_bulb.yaml
โ”‚ย ย      โ”œโ”€โ”€ bedroom_desk_lamp.yaml
โ”‚ย ย      โ”œโ”€โ”€ bedroom_mirror_lightstrip.yaml
โ”‚ย ย      โ”œโ”€โ”€ frontroom_lights_default.yaml
โ”‚ย ย      โ”œโ”€โ”€ kitchen_paper_lantern.yaml
โ”‚ย ย      โ”œโ”€โ”€ kitchen_sink_bulb.yaml
โ”‚ย ย      โ”œโ”€โ”€ living_room_bloom_left.yaml
โ”‚ย ย      โ”œโ”€โ”€ living_room_bloom_right.yaml
โ”‚ย ย      โ”œโ”€โ”€ makeup_station_bulb.yaml
โ”‚ย ย      โ””โ”€โ”€ piano_lamp.yaml
โ”œโ”€โ”€ location-actions
โ”‚ย ย  โ”œโ”€โ”€ arm_stereo.yaml
โ”‚ย ย  โ”œโ”€โ”€ disable_arrival_trigger.yaml
โ”‚ย ย  โ”œโ”€โ”€ location-actions-lighting
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ all_lights_default_on_sunset.yaml
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ all_lights_dimmed_at_time.yaml
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ polerbear_preslight_off.yaml
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ polerbear_preslight_on.yaml
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ shirokuma_preslight_off.yaml
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ shirokuma_preslight_on.yaml
โ”‚ย ย  โ”œโ”€โ”€ power_off_on_not_home.yaml
โ”‚ย ย  โ”œโ”€โ”€ set_arrival_trigger.yaml
โ”‚ย ย  โ”œโ”€โ”€ shirokuma_leaves_morning.yaml
โ”‚ย ย  โ”œโ”€โ”€ trigger_authorized_arrival.yaml
โ”‚ย ย  โ””โ”€โ”€ trigger_unauthorized_arrival.yaml
โ”œโ”€โ”€ location-notices
โ”‚ย ย  โ”œโ”€โ”€ motion_notice.yaml
โ”‚ย ย  โ”œโ”€โ”€ polerbear_enters_home.yaml
โ”‚ย ย  โ”œโ”€โ”€ polerbear_enters_round1.yaml
โ”‚ย ย  โ”œโ”€โ”€ polerbear_leaves_downtown_la.yaml
โ”‚ย ย  โ”œโ”€โ”€ polerbear_leaves_home.yaml
โ”‚ย ย  โ”œโ”€โ”€ polerbear_leaves_metro.yaml
โ”‚ย ย  โ”œโ”€โ”€ shirokuma_enters_home.yaml
โ”‚ย ย  โ”œโ”€โ”€ shirokuma_leaves_csulb.yaml
โ”‚ย ย  โ”œโ”€โ”€ shirokuma_leaves_home.yaml
โ”‚ย ย  โ””โ”€โ”€ shirokuma_leaves_tlc.yaml
โ”œโ”€โ”€ okinasai_actions.yaml
โ”œโ”€โ”€ okinasai_trigger_end.yaml
โ”œโ”€โ”€ okinasai_trigger_sleepin.yaml
โ”œโ”€โ”€ okinasai_trigger.yaml
โ”œโ”€โ”€ oyasumi_actions.yaml
โ”œโ”€โ”€ zwave_heal.yaml
โ””โ”€โ”€ zwave_reset.yaml

@tylerstraub Thanks! That's exactly what happening, all of those scripts ending in .yaml will be loaded - could you try moving/renaming any scripts that are in disabled folders?

@kellerza Maybe we should consider adding an exclusion for 'disabled' or . directories?

Sure, I will give that a try when I have a moment to pause from work and report back.

@kellerza some means of folder exclusion would be really useful for ease of workflow in some cases.

@lwis that did it!

Removing the disabled folders from the automation tree and eliminating all but the single automation definition from my Config.yaml brought everything back online with the latest HEAD.

Cheers! Thanks again.

You cant have configurable exclusion though.

Suggest exclusions based on folders and files starting with . and _. For Windows users . is a pita, and Linux users understand .

Edit: on second thought, simply chaning the extention to not be .yaml should be good enough. Say .badyaml or .disabled

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rschaeuble picture rschaeuble  ยท  230Comments

nodkan picture nodkan  ยท  161Comments

kdschlosser picture kdschlosser  ยท  374Comments

Gio76 picture Gio76  ยท  223Comments

grantalewis picture grantalewis  ยท  145Comments