Automations integration not loading

So, I’m at a loss here. All my automations cease working. I was using an automation that I built weeks ago and I duplicated it to make a similar one. After I saved that new one, all my automations stopped working. I rebooted HA and the integration completely disappeared from homeasstant.

The log entry states:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/device_automation/__init__.py", line 109, in async_get_device_automation_platform
    integration = await async_get_integration_with_requirements(hass, domain)
  File "/usr/src/homeassistant/homeassistant/requirements.py", line 58, in async_get_integration_with_requirements
    integration = await async_get_integration(hass, domain)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 566, in async_get_integration
    integration = await _async_get_integration(hass, domain)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 594, in _async_get_integration
    raise IntegrationNotFound(domain)
homeassistant.loader.IntegrationNotFound: Integration '' not found.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 254, in _async_setup_component
    result = await task
  File "/usr/src/homeassistant/homeassistant/components/automation/__init__.py", line 236, in async_setup
    if not await _async_process_config(hass, config, component):
  File "/usr/src/homeassistant/homeassistant/components/automation/__init__.py", line 643, in _async_process_config
    await async_validate_config_item(hass, raw_config),
  File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 86, in async_validate_config_item
    config[CONF_ACTION] = await script.async_validate_actions_config(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 241, in async_validate_actions_config
    return await asyncio.gather(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 288, in async_validate_action_config
    choose_conf[CONF_SEQUENCE] = await async_validate_actions_config(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 241, in async_validate_actions_config
    return await asyncio.gather(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 288, in async_validate_action_config
    choose_conf[CONF_SEQUENCE] = await async_validate_actions_config(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 241, in async_validate_actions_config
    return await asyncio.gather(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 256, in async_validate_action_config
    platform = await device_automation.async_get_device_automation_platform(
  File "/usr/src/homeassistant/homeassistant/components/device_automation/__init__.py", line 112, in async_get_device_automation_platform
    raise InvalidDeviceAutomationConfig(
homeassistant.components.device_automation.exceptions.InvalidDeviceAutomationConfig: Integration '' not found

I have a backup from a few weeks ago to fall back to if needed, but if I can fix this, that would be preferable. Any ideas how to go about it?

Thanks.

You have an invalid device action somewhere. You’ll have to delete the action in question through yaml.

That’s kind of what I deduced. Any idea how I can figure out which device it is (I have a lot of devices and it may not jump out at me)?

That’s going to be difficult. It’s going to be a device action where the device doesn’t make sense for desired action. Like turning on a window.

I already removed the new automation I created just before this started from automations.yaml and restarted the server. No luck.

Would I be looking for the device in automations.yaml or somewhere else?

In your automations or your scripts

You can also look at your devices and see if any are missing

So, I deleted everything from automations.yaml (after making a backup and even taking a snapshot of the VM), and rebooted to see if the mal-formed device was even in that. And automations now show up in the sidebar, and all the automations I just deleted from automations.yaml are listed, but they are all orphaned and disabled. So, I guess I don’t quite follow where it is pulling that data from since I just cleared out automations.yaml, but my automations are still listed.

That’s the entity configuration. The system knows that automations used to exist with specific entity ids.

I figured automations.yaml was being referenced by something else and was just the config of the automations, that just confirms it. Sorry, I’m still digesting the data flow of HA. Also, just have to note that your comment about turning on a window made me chuckle.

Either way, even if I remove the config from automations.yaml, is there a way I can delete the automation itself from somewhere else?

Ok, figured it out. I have a blueprint that I use to configure an aerotec 4 quadrent zwave button pad. It has automations for all 4 buttons/double-tap/hold/etc. I added a second action to the automation for pressing the buttons, and it added a line to automations.yaml of “device” and “domain” for one of the entries (I have no idea how). but removing those two blank references and restarting the server cleared it up.

I appreciate your assistance, petro.

1 Like