Integration broken since HA 2024.5.x
Closed this issue · 5 comments
Hi,
I really loved this integration and it has been working perfect until a few weeks back. Do not know exacly when it broke but every time a button is pressed it generats the following error:
`Logger: homeassistant
Källa: helpers/frame.py:203
Inträffade först: 19:31:20 (3 händelser)
Senast loggade: 19:31:20
Error doing job: Future exception was never retrieved
Traceback (most recent call last):
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/flichub/binary_sensor.py", line 214, in _event_callback
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1008, in async_write_ha_state
self.hass.verify_event_loop_thread("async_write_ha_state")
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 'flichub' calls async_write_ha_state from a thread at custom_components/flichub/binary_sensor.py, line 214: self.async_write_ha_state(). Please report it to the author of the 'flichub' custom integration.
`
Does someone know how to fix this or does it work for anyone else? Thanks!!!
Does anyone else have the same issue?
I have the same issue. The buttons show up and the sdk report the button clicks.
Just nothing received by HA. @JohNan
Thank you for reporting the issues.
I have very limited time to spend on side projects right now, so any help would be appreciated. The repository is open for pull requests and I will look at and merge if it looks sane. I will do my best to find the time need to fix it, but right now it might take a while unfortunately.
I hope that the community can step up here 🙏
Thank you for reporting the issues.
I have very limited time to spend on side projects right now, so any help would be appreciated. The repository is open for pull requests and I will look at and merge if it looks sane. I will do my best to find the time need to fix it, but right now it might take a while unfortunately.
I hope that the community can step up here 🙏
I am not good at thease thing but I did search for it and it looks like this could be solved easily. A lot of custom components broke with this HA release and was solved by changing last line in binary_sensor.py.
I created a pull request for you but it works for me now @JohNan ;)