Custom Sonoff integration will not load (resolved: it was not the Sonoff integration)

Hi all,

I noticed a problem when I was adding new light bulbs. When I wanted to create a new automation for the new bulbs but I couldn’t see the new bulbs in the entity dropdownbox for the automation. When I returned to the automation screen I saw all automations were grayed out. So I went to ‘server controls’ to restart Home assistant. After the restart the ‘automations’ option had completely disappeared from the configuration dashboard. I started to look around in the UI and I updated HA to the latest version, but after the restart the automations did not appear. I checked the logfile and found errors on the custom components integration for Sonoff. I do not know what is causing these errors, the integration has been running stable for over 7 months.

Can you help me to fix this?

The logfile:

2021-11-23 14:18:31 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration sonoff which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-11-23 14:18:35 WARNING (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook 745248ec28c29bca504c08b14021f05bbea6e607a267ca1f729fb5235f27fab4 from 192.168.178.31
2021-11-23 14:18:35 WARNING (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook 745248ec28c29bca504c08b14021f05bbea6e607a267ca1f729fb5235f27fab4 from 192.168.178.31
2021-11-23 14:18:38 ERROR (MainThread) [homeassistant.setup] Error during setup of component automation
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 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
2021-11-23 14:18:38 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of default_config. Setup failed for dependencies: automation
2021-11-23 14:18:38 ERROR (MainThread) [homeassistant.setup] Setup failed for default_config: Could not set up all dependencies.
2021-11-23 14:18:40 WARNING (Recorder) [homeassistant.components.recorder.migration] Database is about to upgrade. Schema version: 13
2021-11-23 14:18:40 WARNING (Recorder) [homeassistant.components.recorder.migration] Adding columns name to table statistics_meta. Note: this can take several minutes on large databases and slow computers. Please be patient!
2021-11-23 14:18:40 WARNING (Recorder) [homeassistant.components.recorder.migration] Column name already exists on statistics_meta, continuing
2021-11-23 15:12:59 WARNING (MainThread) [zigpy_deconz.api] No response to ‘Command.aps_data_indication’ command with seq id ‘0xdb’
2021-11-23 15:21:43 WARNING (MainThread) [zigpy_deconz.api] No response to ‘Command.aps_data_indication’ command with seq id ‘0x42’

You can all stop looking, I found it :slight_smile:

Apparently it was not the Sonoff integration after all, it was the creation of a new automation that resulted in a corrupt automations.yaml file. I had copied another automation to use as a template, but I could not find the newly created bulbs, so I pressed save, and that has apparently created an automation with a for a device ’ ’ (empty quotes) and that corrupted the automations.yaml and blocked all automations.

I removed the automation from the yaml file and restarted HA and bob’s your uncle.

Thanks for your relentless research on this matter!

1 Like