when starting up hass the below setup works but once I add a second automation script it fails to start with the following error
16-12-12 22:29:35 ERROR (MainThread) [homeassistant.bootstrap] component automation failed to initialize
16-12-12 22:29:35 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service=create, service_call_id=139750808268528-1, domain=persistent_notification, service_data=message=The following components and platforms could not be set up:
* [automation](https://home-assistant.io/components/automation/)
Please check your config, title=Invalid config, notification_id=invalid_config>
the working config looks like this
File stucture
config
automation
| scripts.yaml
configuration.yaml
#Automation
automation: !include_dir_merge_named automation
scripts.yaml
alias: 'Switch to bedside light'
condition:
condition: state
entity_id: zone.home
state: 'zoning'
trigger:
platform: state
entity_id: light.bedside_light
state: 'on'
action:
service: homeassistant.turn_off
entity_id: light.overhead_light
This all works but once I add the below it fails to load the automation component
scripts.yaml
- alias: 'Switch to bedside light'
condition:
condition: state
entity_id: zone.home
state: 'zoning'
trigger:
platform: state
entity_id: light.bedside_light
state: 'on'
action:
service: homeassistant.turn_off
entity_id: light.overhead_light
- alias: 'Switch to overhead light'
condition:
condition: state
entity_id: zone.home
state: 'zoning'
trigger:
platform: state
entity_id: light.overhead_light
state: 'on'
action:
service: homeassistant.turn_off
entity_id: light.bedside_light
I’ve looked through other examples, tested the config against the —check_config script and verified the yaml is correct and yet it isn’t working, Does anybody have any idea whats wrong?