New and old automation gives errors

I have in my configuration.yaml

automation: !include automations.yaml
automation old: !include_dir_list configuration/automation/

This gives following error:

2017-06-24 21:16:52 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: required key not provided @ data[‘action’]. Got None
required key not provided @ data[‘trigger’]. Got None. (See /home/homeassistant/.homeassistant/configuration.yaml, line 64). Please check the docs at https://home-assistant.io/components/automation/

Automations are working but how do I get these errors away

That error means that one of your automations doesn’t have an action, or the action is not correctly formatted.

- action:
  • alias: Turnoff
    data:
    entity_id: switch.everspring_an158_plugin_meter_appliance_module_switch_2_0
    service: homeassistant.turn_off
    alias: test
    id: ‘1498320033017’
    trigger:
  • entity_id: binary_sensor.neo_door01_sensor_50_0
    from: ‘off’
    platform: state
    to: ‘on’

Dont know what is wrong with these

You should use the preformatted text option so we can see spacing!

You can accomplish this by highlighting your code and click on the Preformatted text option in the forums GUI (Shortcut: Ctrl+Shift+C)

2 Likes

Or you can highlight the code block and select this button.

Ugh, the new automation editor doesn’t make these things very readable does it?

I suspect that it will be in the formatting, if I’d wrote it manually it would be…

id: '1498320033017'
alias: 'Turn off' 
trigger:
  platform: state
  entity_id: binary_sensor.neo_door01_sensor_50_0
  from: 'off'
  to: 'on'
action:
  service: homeassistant.turn_off
  entity_id: switch.everspring_an158_plugin_meter_appliance_module_switch_2_0

I fixed the problem I had a automations.yaml for the new automation editor in the folder where also my automations are included. I have moved the automations.yaml for the new editor to another folder now everything is working fine