I lost my sonoff integration after upgrade 2024.1.3

Hi HA gurus,

Please help… after i upgrade HA core to 2024.1.3, i lost my control to Sonoff device’s.

Please find below errors:-

Logger: homeassistant.setup
Source: setup.py:251
First occurred: 18:15:59 (1 occurrences)
Last logged: 18:15:59

Setup failed for custom integration ‘sonoff’: Unable to import component: Exception importing custom_components.sonoff
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/loader.py”, line 822, in get_component
ComponentProtocol, importlib.import_module(self.pkg_path)
File “/usr/local/lib/python3.11/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1204, in _gcd_import
File “”, line 1176, in _find_and_load
File “”, line 1147, in _find_and_load_unlocked
File “”, line 690, in _load_unlocked
File “”, line 940, in exec_module
File “”, line 241, in _call_with_frames_removed
File “/config/custom_components/sonoff/init.py”, line 28, in
from .core import devices as core_devices
File “/config/custom_components/sonoff/core/devices.py”, line 102, in
PULSEWIDTH = spec(XPulseWidth, param=“pulseWidth”, enabled=False)
File “/config/custom_components/sonoff/core/devices.py”, line 88, in spec
return type(cls.name, (cls,), {**cls.dict, **kwargs})
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 408, in init
wrap_attr(cls, property_name)
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 380, in wrap_attr
raise TypeError(f"Can’t override {attr_name} in subclass")
TypeError: Can’t override _attr_native_min_value in subclass

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

Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/setup.py”, line 251, in _async_setup_component
component = integration.get_component()
File “/usr/src/homeassistant/homeassistant/loader.py”, line 830, in get_component
raise ImportError(f"Exception importing {self.pkg_path}") from err
ImportError: Exception importing custom_components.sonoff


Did you upgrade to v3.5.4 - 2024-01-04 ?

Sorry Francisp.

Version you have mentioned is about the sonoff?

If yes, do you have the link of the Github?

Hi Francisp,

I found the github link…

Thanks i will try to update it…

1 Like


Issue is fixed after updated the sonoff version…

I had the same problem and panicked initially because I use this integration for vital operations including the heating system. According to the logs, the old version of the SONOFF was using deprecated variables no longer supplied by Home Assistant.

I am relieved to say it worked after updating the integration, but that was not automatic. It was not listed in notifications as needing upgrade. I had to find that out here! I then navigated to it on the integrations page and upgraded it to the next version manually.

SONOFF should become an official Home Assistant integration!