Error during setup of component automation

I have the following problem and i can not figure out what’s the problem.

Logger: homeassistant.setup
Source: components/device_automation/__init__.py:84
First occurred: 13:15:23 (1 occurrences)
Last logged: 13:15:23
Error during setup of component automation

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/device_automation/__init__.py", line 81, in async_get_device_automation_platform
    integration = await async_get_integration_with_requirements(hass, domain)
  File "/usr/src/homeassistant/homeassistant/requirements.py", line 47, in async_get_integration_with_requirements
    integration = await async_get_integration(hass, domain)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 491, 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 213, in _async_setup_component
    result = await task
  File "/usr/src/homeassistant/homeassistant/components/automation/__init__.py", line 169, in async_setup
    if not await _async_process_config(hass, config, component):
  File "/usr/src/homeassistant/homeassistant/components/automation/__init__.py", line 512, in _async_process_config
    await async_validate_config_item(
  File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 74, in async_validate_config_item
    config[CONF_ACTION] = await script.async_validate_actions_config(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 143, in async_validate_actions_config
    return await asyncio.gather(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 182, in async_validate_action_config
    config[CONF_DEFAULT] = await async_validate_actions_config(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 143, in async_validate_actions_config
    return await asyncio.gather(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 158, 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 84, in async_get_device_automation_platform
    raise InvalidDeviceAutomationConfig(
homeassistant.components.device_automation.exceptions.InvalidDeviceAutomationConfig: Integration '' not found

That’s suspicious. Did you check configuration? “Configuration” → “Server Controls” → " Configuration validation"

Yes i did but it says configuration is valid (but then in dutch) it happend after i tried working with blueprints.

Have a look for a stray colon somewhere.

cannot find anything, gonna restore a snapshot.

I also had the same issue after working with Blueprints. What fixed it for me was to delete the last Blueprint that I had installed, then manually remove the automation it created in automations.yaml. Then restarted Home Assistant and things are back to normal.

1 Like

I have exactly the same issue… Playing with blueprints and biiiimmMMm … this error. I will remove all blueprints and automations and restart and check… will be back in a second … :stuck_out_tongue:

WORKS! :slight_smile:

in fact it’s this issue:

1 Like

would be nice if i would have known this back when i had this problem…

I had this exact issue today, on Home Assistant 2021.12.1.

The issue was caused by editing of an Automation Blueprint on the Android HA App, which apparently caused an invalid entry to be added to the blueprint for my Sengled Smart Light Switch (Noblewolf/zha-sengled-smart-light-switch-e1e-g7f-with-complete-control-of-every-button.yaml).

The invalid part was the last entry in this list for the off_long_press action (I’ve cut out all the other actions as they were fine):

- id: '1636592329514'
  alias: Sengled Smart Light Switch (E1E-G7F) ZHA
  description: ''
  use_blueprint:
    path: Noblewolf/zha-sengled-smart-light-switch-e1e-g7f-with-complete-control-of-every-button.yaml
    input:
      off_long_press:
      - type: turn_off
        device_id: 6d8a30513af549a374084506d0e8bb32
        entity_id: light.light01
        domain: light
      - type: turn_off
        device_id: 106001b5cab3489c99cdfa15a8b2636a
        entity_id: light.gledopto_gl_mc_001_f863e91e_level_light_color_on_off
        domain: light
      - type: turn_off
        device_id: 1a226c3f0037423980f3101d83d0b5ab
        entity_id: light.philips_lwe001_66319e08_level_on_off
        domain: light
      - type: turn_off
        device_id: 46738543f992d22e65ac288d3cd9c7f5
        entity_id: switch.plug02
        domain: switch
      - device_id: ''
        domain: ''
        entity_id: ''

Note the last entry: no type, and empty device_id, domain and entity_id. These were apparently added while I was modifying this blueprint’s action on my mobile app (I was adding the switch.plug02 entry).

After I removed the invalid entry (the last one) in the file editor, saved the automations.yaml file and restarted HA, the error was gone and the automations worked again normally.

Thanks for posting this @SandroG - I had exactly the same issue where i had played with a Blueprint for Actionable Android Notifications and this took me directly to the problem.

Similar issue today with the zooz Zen30 blueprint. After I found this thread, I deleted the BP from the directory and re-imported without issue

Same or similar issue here - in my case the case was a renamed device which caused a malfunctioning blueprint… Only way “out” (to get some of the automations working again) was deleting the blueprint for the automation that malfunctioned. Luckily I had only used this in only one place…