HA crashes because of HACS integration
My homeassistant instance keeps crashing in about 30 sec after startup. At least the front end. From logs, I think it's because the hass.agent integration. How do I get rid of it without the front end? I tried to rename the folder but the same error is happening.
2024-11-01 22:21:20.168 ERROR (SyncWorker_5) [homeassistant.util.logging] Exception in updated when handling msg on 'hass.agent/devices/PC': '{"serial_number":"24ce56b4-001a-410b-a5cf-5efcd4160827","device":{"identifiers":"hass.agent-PC","manufacturer":"LAB02 Research","model":"Microsoft Windows NT 10.0.19045.0","name":"PC","sw_version":"2022.14.0"},"apis":{"notifications":true,"media_player":true}}'
Traceback (most recent call last):
File "/config/custom_components/hass_agent_disabled/init.py", line 144, in updated
update_device_info(hass, entry, payload)
File "/config/custom_components/hass_agent_disabled/init.py", line 29, in update_device_info
device_registry.async_get_or_create(
File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 834, in async_get_or_create
device = self.async_update_device(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 1066, in async_update_device
self.hass.verify_event_loop_thread("device_registry.async_update_device")
File "/usr/src/homeassistant/homeassistant/core.py", line 462, in verify_event_loop_thread
frame.report_non_thread_safe_operation(what)
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 229, in report_non_thread_safe_operation
report(
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 163, in report
_report_integration(what, integration_frame, level, error_if_integration)
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 201, in _report_integration
raise RuntimeError(
RuntimeError: Detected that custom integration 'hass_agent_disabled' calls device_registry.async_update_device from a thread other than the event loop, which may cause Home Assistant to crash or data to corrupt. For more information, see https://developers.home-assistant.io/docs/asyncio_thread_safety/#device_registryasync_update_device at custom_components/hass_agent_disabled/init.py, line 29: device_registry.async_get_or_create(. Please report it to the author of the 'hass_agent_disabled' custom integration.
6 Replies
Hello
looks like you're using the original ingration and not the forked one
previously this ended up with and error not a crash @DrR0x is it the time to report the original integration as broken to HACS :D?
@Wolgor so, if you cannot access the UI to remove it from HACS the quickest one would be to follow those steps: https://github.com/hass-agent/HASS.Agent-Integration/issues/2#issuecomment-2106011087
Those were the manual fix steps before we fixed that in the forked integration
GitHub
Bug: Latest HA Core update 2024.5.0 breaks notification entities. ·...
Please make sure that the issue you're planning to report is not already registered :) Describe the bug The latest HA Core update (2024.5.0) stops hass.agent from creating any notify entities. ...
after doing that you'll be able to go in, remove the old integration from HACS and install the forked one - https://github.com/hass-agent/HASS.Agent-Integration?tab=readme-ov-file#installation
GitHub
GitHub - hass-agent/HASS.Agent-Integration: HASS.Agent's Home Assis...
HASS.Agent's Home Assistant integration. Adds notifications and mediaplayer capabilities to HASS.Agent - a Windows based client (companion app) for Home Assistant. - hass-agent/HASS.Agent-I...
if you're not comfortable doing the edits manually I can send you the whole modified file so you'll just copy and replace it whole
I already removed, but my HA still crashes. Can't find any more error 😦
what is the last log before crash?