LAB02-Research / HASS.Agent-Integration

HASS.Agent's Home Assistant integration. Adds notifications and mediaplayer capabilities to HASS.Agent - a Windows based client (companion app) for Home Assistant.
MIT License
101 stars 17 forks source link

async_create_task error after updating to HA Core 2024.5.0b6 #46

Closed v1k70rk4 closed 2 months ago

v1k70rk4 commented 2 months ago

Hello,

I'm receiving the following error after updating to HA Core 2024.5.0b6. Thank you in advance for the fix.

Napló: homeassistant.util.logging
Forrás: util/logging.py:98
Először fordult elő: 19:02:31 (1 Események)
Utoljára naplózott: 19:02:31

Exception in updated when handling msg on 'hass.agent/devices/MEDIASERVER': '{"serial_number":"5abae8a6-0533-440e-8743-7f802db26a86","device":{"identifiers":"hass.agent-MEDIASERVER","manufacturer":"LAB02 Research","model":"Microsoft Windows NT 10.0.22631.0","name":"MEDIASERVER","sw_version":"2022.14.0"},"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.
atax112 commented 2 months ago

Yeah, the last update broke something for hass.agent unfortunately...media entity and notification service as well..

atax112 commented 2 months ago

Hey, @v1k70rk4 see https://github.com/LAB02-Research/HASS.Agent-Integration/issues/47#issuecomment-2090454867 for possible related fix.

v1k70rk4 commented 2 months ago

@atax112 Thank you very much :)