Check Config should validate entity_ids across all files

The “Check Config” button should check entity_ids to see if they actually exist, and give a warning and reference to a file and line number if they do not exist.

As of 0.70.0 this does not happen.

Current behavior:

In entity_registry.yaml I called something “switch.front_porch” but in automations.yaml I entered “switch.front_patio”. Check Config happily validates the YAML, but does not tell me “switch.front_patio” does not exist. I only find out later in the logs when I get “reproduce_state: Unable to find entity switch.front_patio”. Since some automations are called infrequently, this may not be apparent for some time.

Desired behavior:

Check Config validates the YAML, then proceeds to validate entity_ids on all !included yaml files. It generates a warning such as “Warning: unknown entity_id ‘switch.front_patio’ in automations.yaml on line 72.”

I can help code and test such a feature if pointed in the right direction.

I don’t think this is physically possible, because not all entity_ids come from configuration.

Example - tp-link switches are named via the kasa app. The name is only recorded in configuration where the entity_id is.

Same with chromecast.

  platform: cast

Could generate one player, could generate a hundred. Regardless of how many there are, they are named (and can be renamed) in the Google app, so there’s no way for check_config to know whether the entity_id media_player.livingroom is a valid one or not.