Automation disappears

Setup failed for default_config: (DependencyError(…), ‘Could not setup dependencies: automation’)

Unable to set up dependencies of default_config. Setup failed for dependencies: automation

Error during setup of component automation
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/setup.py”, line 288, in _async_setup_component
result = await task
^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/automation/init.py”, line 252, in async_setup
await _async_process_config(hass, config, component)
File “/usr/src/homeassistant/homeassistant/components/automation/init.py”, line 972, in _async_process_config
entities = await _create_automation_entities(hass, updated_automation_configs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/automation/init.py”, line 856, in _create_automation_entities
cond_func = await _async_process_if(hass, name, config_block)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/automation/init.py”, line 985, in _async_process_if
checks.append(await condition.async_from_config(hass, if_config))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/condition.py”, line 246, in async_from_config
return cast(ConditionCheckerType, await factory(hass, config))
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/condition.py”, line 254, in async_and_from_config
checks = [await async_from_config(hass, entry) for entry in config[“conditions”]]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/condition.py”, line 254, in
checks = [await async_from_config(hass, entry) for entry in config[“conditions”]]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/condition.py”, line 246, in async_from_config
return cast(ConditionCheckerType, await factory(hass, config))
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/device_automation/condition.py”, line 55, in async_condition_from_config
return trace_condition_function(platform.async_condition_from_config(hass, config))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/switch/device_condition.py”, line 26, in async_condition_from_config
return toggle_entity.async_condition_from_config(hass, config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/device_automation/toggle_entity.py”, line 146, in async_condition_from_config
state_config = condition.state_validate_config(hass, state_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/condition.py”, line 1022, in state_validate_config
config[CONF_ENTITY_ID] = er.async_validate_entity_ids(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/entity_registry.py”, line 1380, in async_validate_entity_ids
return [async_validate_entity_id(registry, item) for item in entity_ids_or_uuids]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/entity_registry.py”, line 1380, in
return [async_validate_entity_id(registry, item) for item in entity_ids_or_uuids]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/entity_registry.py”, line 1349, in async_validate_entity_id
raise vol.Invalid(f"Unknown entity registry entry {entity_id_or_uuid}")
voluptuous.error.Invalid: Unknown entity registry entry 44bd9d4c8c9708a807160c0e8387ffb5

You are using a device that is no longer available. Remove it from your config/automations.yaml file.

This has been a known issue for a while:

The best thing you can do is not use device_ids.