So, this is a thing I can’t figure out:
My HA config is running fine, with no errors in home-assistant.log and the UI. When I run “check configuration” in the UI, all is OK, and home assistant stops/starts OK.
Things break when I run ha core check
from the CLI:
$ ha core check
Processing... Done.
Error: Testing configuration at /config
INFO:homeassistant.util.package:Attempting install of integrationhelper>=0.2.2
INFO:homeassistant.util.package:Attempting install of aiogithubapi>=21.2.0
INFO:homeassistant.util.package:Attempting install of hacs_frontend==20210214110032
INFO:homeassistant.util.package:Attempting install of queueman==0.5
ERROR:homeassistant.helpers.check_config:Unexpected error validating config
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/check_config.py", line 147, in async_check_ha_config_file
await config_validator.async_validate_config( # type: ignore
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 103, in async_validate_config
await asyncio.gather(
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 85, in _try_async_validate_config_item
config = await async_validate_config_item(hass, config, full_config)
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 63, in async_validate_config_item
config[CONF_TRIGGER] = await async_validate_trigger_config(
File "/usr/src/homeassistant/homeassistant/helpers/trigger.py", line 49, in async_validate_trigger_config
conf = await platform.async_validate_trigger_config(hass, conf)
File "/usr/src/homeassistant/homeassistant/components/device_automation/trigger.py", line 21, in async_validate_trigger_config
return await getattr(platform, "async_validate_trigger_config")(hass, config)
File "/usr/src/homeassistant/homeassistant/components/deconz/device_trigger.py", line 412, in async_validate_trigger_config
device_registry = await hass.helpers.device_registry.async_get_registry()
File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 615, in async_get_registry
return async_get(hass)
File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 599, in async_get
return cast(DeviceRegistry, hass.data[DATA_REGISTRY])
KeyError: 'device_registry'
Failed config
automation:
- Unexpected error calling config validator: 'device_registry'
Automations are loaded as followed:
$ cat integrations/automation.yaml
---
automation: !include ../automations.yaml
automation split: !include_dir_list ../automations
The ha core check
command runs OK when I remove the automation config.
I’m on 2021.2.3 /w home assistant OS.
Clues are welcome