Closed andguay closed 1 month ago
Ha yes Sinopé did change some attribute for the MC3100ZB. ATTR_OPTOUT is no ponger used for that device. I'll make a patch and let you know when it is ready
Try this branch and let me know https://github.com/claudegel/sinope-130/tree/mc3100zb/custom_components/neviweb130 Just pick the switch.py file and paste over the one you have in HA. Restart HA and it should work.
Renamed switch.py to switch.old and uploaded new switch.py.
Sorry to report, new loading errors.
Home Assistant Core 2024-07-21 08:44:49.870 ERROR (ImportExecutor_0) [homeassistant.loader] Unexpected exception importing platform custom_components.neviweb130.switch 2024-07-21 08:44:49.941 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module with args ('custom_components.neviweb130.switch',) in /usr/src/homeassistant/homeassistant/loader.py, line 1296: return importlib.import_module(f"{self.pkg_path}.{platform_name}") inside the event loop; This is causing stability issues. Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue 2024-07-21 08:44:49.958 ERROR (MainThread) [homeassistant.loader] Unexpected exception importing platform custom_components.neviweb130.switch 2024-07-21 08:44:49.961 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform 'neviweb130.switch': Platform not found (Exception importing custom_components.neviweb130.switch).
Logger: homeassistant.setup Source: setup.py:485 First occurred: 8:44:49 AM (1 occurrences) Last logged: 8:44:49 AM
Unable to prepare setup for platform 'neviweb130.switch': Platform not found (Exception importing custom_components.neviweb130.switch).
Logger: homeassistant.loader Source: loader.py:1264 First occurred: 8:44:49 AM (2 occurrences) Last logged: 8:44:49 AM
Unexpected exception importing platform custom_components.neviweb130.switch
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 1264, in _load_platform
cache[full_name] = self._import_platform(platform_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1296, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/loop.py", line 200, in protected_loop_func
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "
^
SyntaxError: invalid character '·' (U+00B7)
switch.py on that branch is the same as what I have on my HA and it load no problem. Maybe there is an error done when you copy the new switch.py. Can you open it and show me line 111, it should be ATTR_TEMP_ALARM,
Man... I feel so stupid. I copied the wrong file first time. Sorry... Everything works now.
Merci Claude ! :-)
OK I'll push a release today.
Tried to rollback to 2024.7.2 but somehow the error is still there.
Everything works fine except the MC3100ZB controller.
If I try to re-add it is grayed-out
Error Log entry : Logger: homeassistant.components.switch Source: helpers/entity_platform.py:727 integration: Switch (documentation, issues) First occurred: 9:37:11 PM (1 occurrences) Last logged: 9:37:11 PM
neviweb130: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 727, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1298, in async_device_update await hass.async_add_executor_job(self.update) File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/neviweb130/switch.py", line 1472, in update self._drstatus_optout = device_data[ATTR_DRSTATUS][ATTR_OPTOUT]