HASS.Agent: Bug: Detected that custom integration 'hass_agent' calls async_create_task from a thread
Hi! In the logs I have a lot of errors like this:
2024-05-05 19:20:47.751 ERROR (SyncWorker_18) [homeassistant.util.logging] Exception in updated when handling msg on 'hass.agent/devices/DELL-XPS': '{"serial_number":"a22eb536-c455-4789-9996-dd2ee52e5b9c","device":{"identifiers":"hass.agent-DELL-XPS","manufacturer":"HASS.Agent Team","model":"Microsoft Windows NT 10.0.22631.0","name":"DELL-XPS","sw_version":"2.0.1"},"apis":{"notifications":true,"media_player":true}}'
Traceback (most recent call last):
File "/config/custom_components/hass_agent/__init__.py", line 147, in updated
hass.async_create_task(handle_apis_changed(hass, entry, apis))
File "/usr/src/homeassistant/homeassistant/core.py", line 816, in async_create_task
self.verify_event_loop_thread("async_create_task")
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 'hass_agent' calls async_create_task from a thread at custom_components/hass_agent/__init__.py, line 147: hass.async_create_task(handle_apis_changed(hass, entry, apis)). Please report it to the author of the 'hass_agent' custom integration.
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 12
- Comments: 15
Same here since updating from HA core 2024.4.4 to 2024.5.1.
And
This is happening to me too!
Same issue here with 2024.5.2
and also
Didn’t know about it, thanks!
You can install the forked version of integration: https://github.com/hass-agent/HASS.Agent-Integration (needs to be added as a custom repository) In case of questions about the fork: https://github.com/hass-agent/hass.agent?tab=readme-ov-file#fork
Just go through the steps linked by amadeo-alex. I did that and it fixed my issue
Media player and notifications will not work - you can use those steps to get around this https://github.com/hass-agent/HASS.Agent-Integration/issues/2
Nah it’s mostly working. Just this issue.
Can confirm, but there’s also a warning line above the error line that I haven’t seen anyone else post yet:
I’m seeing the same messages in my HA logs. Possibly related to my HASS.Agent notifications no longer working.
I noticed similar log entries today too. Curiously, I have 2 agent instances but only seeing log entries for one of them. Entries repeat roughly every 30 seconds.
Both use satellite service sensors which, on the offending instance, I’ve changed the satellite sensor reporting times to high numbers (e.g. 3000 seconds) but the log entries remain at 30 second intervals. There are no normal sensors in use on said offending instance.
Both are running the same latest versions. The main difference between the two is the OS: Win 10 Pro 22H2 for the log entry one and Win 11 Pro 23H2 for the other.
HASS Agent: 2022.14.0 Satellite: : 2022.20.0.0
HA Core: 2024.5.2 Supervisor: 2024.04.4 Operating System: 12.2 Frontend: 20240501.0