ateodorescu / home-assistant-ipmi

IPMI connector for Home Assistant
MIT License
36 stars 8 forks source link

Error with 2024.5.x #41

Closed SteffenM-DE closed 1 month ago

SteffenM-DE commented 2 months ago

After 2024.5.x update of home assistant, we get the folling at the logs:

2024-05-07 13:43:41.727 WARNING (SyncWorker_7) [homeassistant.helpers.frame] Detected that custom integration 'ipmi' calls async_dispatcher_send from a thread at custom_components/ipmi/server.py, line 303: async_dispatcher_send(, please report it to the author of the 'ipmi' custom integration 2024-05-07 13:43:41.730 ERROR (MainThread) [custom_components.ipmi] Unexpected error fetching IPMI coordinator data Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/ipmi/__init__.py", line 223, in _async_update_data await self.hass.async_add_executor_job(self.ipmiData.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/ipmi/server.py", line 303, in update async_dispatcher_send( File "/usr/src/homeassistant/homeassistant/helpers/dispatcher.py", line 203, in async_dispatcher_send hass.verify_event_loop_thread("async_dispatcher_send") File "/usr/src/homeassistant/homeassistant/core.py", line 440, in verify_event_loop_thread frame.report( File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 162, in report _report_integration(what, integration_frame, level, error_if_integration) File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 203, in _report_integration raise RuntimeError( RuntimeError: Detected that custom integration 'ipmi' calls async_dispatcher_send from a thread at custom_components/ipmi/server.py, line 303: async_dispatcher_send(. Please report it to the author of the 'ipmi' custom integration. 2024-05-07 13:43:41.787 WARNING (SyncWorker_8) [homeassistant.helpers.frame] Detected that custom integration 'ipmi' calls async_dispatcher_send from a thread at custom_components/ipmi/server.py, line 303: async_dispatcher_send(, please report it to the author of the 'ipmi' custom integration 2024-05-07 13:43:41.789 ERROR (MainThread) [custom_components.ipmi] Unexpected error fetching IPMI coordinator data Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/ipmi/__init__.py", line 223, in _async_update_data await self.hass.async_add_executor_job(self.ipmiData.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/ipmi/server.py", line 303, in update async_dispatcher_send( File "/usr/src/homeassistant/homeassistant/helpers/dispatcher.py", line 203, in async_dispatcher_send hass.verify_event_loop_thread("async_dispatcher_send") File "/usr/src/homeassistant/homeassistant/core.py", line 440, in verify_event_loop_thread frame.report( File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 162, in report _report_integration(what, integration_frame, level, error_if_integration) File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 203, in _report_integration raise RuntimeError( RuntimeError: Detected that custom integration 'ipmi' calls async_dispatcher_send from a thread at custom_components/ipmi/server.py, line 303: async_dispatcher_send(. Please report it to the author of the 'ipmi' custom integration.

Some things are chenged in this HA release, so I think the custom integration must change the deprecated functions too.

Thanks, Steffen

flipper commented 1 month ago

Noticed that issue as well. Fixed it in my fork along with support for custom commands: https://github.com/flipper/home-assistant-ipmi/commit/93f518c1eb0d02355b8500a946c32ba751ced663

ateodorescu commented 1 month ago

fixed in https://github.com/ateodorescu/home-assistant-ipmi/pull/43