StreamAssist icon indicating copy to clipboard operation
StreamAssist copied to clipboard

RuntimeError: Detected that custom integration 'stream_assist' calls async_write_ha_state from a thread

Open mterry63 opened this issue 1 year ago • 1 comments

Home Assistant 2024.5.3 logging error: RuntimeError: Detected that custom integration 'stream_assist' calls async_write_ha_state from a thread at custom_components/stream_assist/sensor.py, line 47: self.async_write_ha_state(). Please report it to the author of the 'stream_assist' custom integration.

Reading about this: It’s likely not a thread safe application, which recently (2024.4.x) is causing HA to crash after the full conversion to python 3.12. You should check it with this process: Discord 40. It is in the general channel of the HA Discord and will tell you if this is integration is writing unsafe thread writes.

I think it’s just updating the async_write_ha_state() to schedule_update_ha_state() since it’s not in an async function.

mterry63 avatar May 20 '24 15:05 mterry63

I included a fix for this in PR #26

ADHDSquir avatar May 20 '24 22:05 ADHDSquir

https://github.com/AlexxIT/StreamAssist/releases/tag/v2.1.0

AlexxIT avatar Jul 15 '24 08:07 AlexxIT