Config.yaml error for automation integration

hi All, newbie here :wink:
I am running into an error which I have no idea what causes it and I would appreciate any pointer:

Invalid config for [automation]: required key not provided @ data[‘entity_id’]. Got None. (See /config/configuration.yaml, line 27).

6:33:00 PM – (ERROR) config.py

that section of my configuration.yaml looks like this:
where line 27 is the line starting with ‘group: …’

tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

homeassistant:
  customize: !include customize.yaml

I feel like the error may be within the groups.yaml file

here is the content of that

my_family:
  name: my_family
  entities:
    - person.xx
    - person.yy
    - person.zz

interior_lights:
  name: interior_lights
  entities:
    - light.bdrm_dodo_lamp
    - light.credenza1_level_on_off
    - light.credenza2_level_on_off
    - light.credenza4_level_on_off
    - light.den_dimmer_light
    - light.dimmer_3_shades
    - light.dimmer_breakfast
    - light.dimmer_m_bdrm_recessed
    - light.dimmer_stairs
    - light.eb8070e585857ebf11tyeq
    - light.fr_liv_ceiling_dimmer
    - light.guest_bdrm_dodo_lamp
    - light.guest_bdrm_lights
    - light.guest_rm_dimmer
    - light.guest_room_lamp_2
    - light.kitchen_ceiling_dimmer
    - light.kitchen_lights
    - light.kitchen_undercab_lights
    - light.kitchen_undercabinet_1
    - light.kitchen_undercabinet_2
    - light.led_kitchen_1
#      - light.living_tv_lamp
    - light.m_bdrm_dodo
    - light.m_bdrm_momo
    - light.office_lamp
    - light.piano_level_on_off
    - light.pngu_desk
    - light.salt_lamp_aly_bath
    - light.salt_lamp_den
    - light.salt_lamp_fr_living
    - light.salt_lamps
    - light.sml_bath_dimmer
    - light.sonoff_1000f8ae17
    # - light.tabletop_den_level_on_off
    - light.tabletop_fr_liv_level_on_off
    - light.tabletop_living_level_on_off
    - light.desk_lmp_ank

ext_lights:
  name: ext_lights
  entities:
    - light.back_porch
    - light.driveway_dimmer
    - light.driveway_light
    - light.front_porch_2
    - light.front_porch_light


all_tvs:
  name: all_tvs
  entities:
    - media_player.roku_5_guest
    - media_player.roku_tv_4
    - media_player.sony_bravia_tv

all_switches:
  name: all_switches
  entities:
    - switch.heater_aly
    - switch.heater_guest
    - switch.heater_office
    - switch.heater_momo
    - switch.rotel_amp
    - switch.subwoofer
    - switch.coffee

Any suggestion where the problem might be?

TYA

The error is in your automations.yaml file. If it was in your groups.yaml file this would’ve said “Invalid config for [group]”. What’s in that file?

No it is in your automations,

You forgot to supply an entity id somewhere:

Man,
that is a 2,798 lines file… I can post it here, but do you have a suggestion on how to scrub it in order to find the problem?

Yea I mean it’s what tom said. You’re missing entity_id somewhere, you just have to find where.

It’s kind of weird that file is invalid, its only supposed to be configured by the UI which doesn’t allow invalid things to save. Did you make a change to the text file directly recently? If so I’d start there.

If you’ve made a bunch of changes in the text file then could start opening the automations one by one in the UI editor. I imagine one will have an error when you open it.

Possible I may have manually edited it but I do not remember when /what did I changed then.
Usually I try to avoid that, but not always.

I’ll try suggestion to open every automation in the UI to see if that yields some clue

If that doesn’t work another option is to delete things and revalidate. I don’t know exactly how many automations you have in there but maybe start by deleting 2-5 automations at a time, save, and validate. If it still fails then undo and go to the next 2-5. If it passes then you know the error is in there so now delete one automation at a time from that block. And then once you find the automation start deleting triggers/actions at a time. Etc.

Just keep narrowing down the problem by deleting and undoing deletes until you can spot the issue.

I have about the same m.o. as @CentralCommand
One could give this WTH a vote to see if it comes to favor:

You might want to have a look at the
Watchman custom component

1 Like

managed to find the culprit code, but I am not sure what is causing it as it also says this

- id: '1637612847219'
  alias: Bedtime actions - Guest Bdrm
  description: based on bedtime helper
  trigger:
  - platform: time
    at: input_datetime.bedtime
  condition:
  - condition: state
    entity_id: input_boolean.dnd
    state: 'off'
  - condition: state
    entity_id: input_boolean.athome
    state: 'on'
  action:
  - service: script.guest_bdrm_lights_on_30
  - service: script.mbdrm_lights_on_30
  - type: turn_off
    device_id: c6a5f6a8b28c683b259b2a23b1695391
    domain: light
  mode: single

worst case I can remove the orphan automation entity and re-create it, but perhaps someone can chime in what the problem actually is / how to avoid in the future.

Thanks

I actually like this component.
Even though it did not pick up my particular issue, it found a bunch of other missing referenced IDs

Thanks for sharing!

Try instead


  action:
  - service: script.turn_on
    target:
      entity_id: 
        - script.11 script.guest_bdrm_lights_on_30
        - script.mbdrm_lights_on_30