tmjo / ha-norwegiantide

Tide information for Norway from Kartverket as a custom integration for Home Assistant. Provides tidal data such as time for high/low, ebb/flow and prediction, forecast and observation.
6 stars 0 forks source link

Fikk denne feilmeldingen i dag, kanskje min feil 🤔 #10

Open saeternes opened 1 month ago

saeternes commented 1 month ago

Logger: homeassistant Source: helpers/frame.py:197 First occurred: 1:09:32 pm (4 occurrences) Last logged: 1:12:32 pm

Error doing job: Future exception was never retrieved (None) 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/norwegiantide/init.py", line 132, in update_ha_state entity.async_schedule_update_ha_state(True) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1259, in async_schedule_update_ha_state self.hass.async_create_task( File "/usr/src/homeassistant/homeassistant/core.py", line 807, in async_create_task frame.report_non_thread_safe_operation("hass.async_create_task") File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 225, in report_non_thread_safe_operation report( File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 159, in report _report_integration(what, integration_frame, level, error_if_integration) File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 197, in _report_integration raise RuntimeError( RuntimeError: Detected that custom integration 'norwegiantide' calls hass.async_create_task 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/#hassasync_create_task at custom_components/norwegiantide/init.py, line 132: entity.async_schedule_update_ha_state(True). Please report it to the author of the 'norwegiantide' custom integration.

tmjo commented 1 month ago

Hi and thanks for using the integration. I see the same error message, and have seen it for a couple of months or so. It still seems to be working fine, but clearly there is something I need to fix in the code.