How to really check automation

HI,

Ive run into an automation error in the logs, but can’t seem to find any errors. It is correct yaml, and most of them seem to work…

i get this message: ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: required key not provided @ data['trigger'][0]['entity_id']. Got None. (See /config/configuration.yaml, line 69). Please check the docs at https://home-assistant.io/components/automation/

This most certainly isn’t a configuration.yaml issue, but thats where my automation.yaml is called. All files there are correct. I have id for all automations, also the ones in dedicated packages. I do have empty condition: [] in all of my automations (just started learning to write them and thought it best to be methodical) and that has worked up to today. Apparently there is something but its too small for my eyes.

Hence,. looking for a more specified mechanism than the above error. Ive tried to set the logger to homeassistant.config.automation: debug but i don’t think that does anything. NO reports.

Anyone please? this is mind boggling.

i have 2 suspects so please have a look, maybe we can narrow it down to these:

the first one should trigger the 2 python scripts on any selection in the input_select. (thought i didn’t have to specify, a simple state change is all that happens.

automation:
  - alias: 'Activity change'
    id: '1511601479001'
    hide_entity: True
    initial_state: 'on'
    trigger:
      - platform: state
#        entity_id: input_select.activity
      - entity_id: input_select.wat_te_doen
    condition: []
    action:
      - service: python_script.activity
        data_template:
          event: "{{ trigger.event }}"
      - service: python_script.summary

the second is rather alike:

automation:
  - alias: 'Profile change'
    id: '1511601479005'
    hide_entity: True
    initial_state: 'on'
    trigger:
      - platform: state
        entity_id: input_select.ha_mode
    condition: []
    action:
      - service: script.refresh

Cheers,

Marius

I would take that condition part out until you need a condition.

image

bingo!

I completely missed that, and since it is correct yaml, so did Yamllint…
Learning here, you say its a condition part, but it is under the trigger, and not yet the condition bit of the automation?

Thanks!
Marius