ufozone / ha-zcs-mower

ZCS Lawn Mower Robots (Ambrogio, Techline, Wiper) platform as a Custom Component for Home Assistant.
MIT License
16 stars 0 forks source link

Error adding entity device_tracker #127

Closed ufozone closed 2 months ago

ufozone commented 2 months ago
2024-05-04 21:11:44.206 WARNING (DbWorker_1) [homeassistant.helpers.frame] Detected that custom integration 'zcsmower' calls async_create_task from a thread at custom_components/zcsmower/device_tracker.py, line 124: self.hass.async_create_task(, please report it to the author of the 'zcsmower' custom integration
2024-05-04 21:11:44.259 ERROR (MainThread) [homeassistant.components.device_tracker] Error adding entity device_tracker.mower_359129350765594 for domain device_tracker with platform zcsmower
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 892, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1365, in add_to_platform_finish
    await self.async_added_to_hass()
  File "/config/custom_components/zcsmower/device_tracker.py", line 96, in async_added_to_hass
    await get_instance(self.hass).async_add_executor_job(
  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/zcsmower/device_tracker.py", line 124, in _get_location_history
    self.hass.async_create_task(
  File "/usr/src/homeassistant/homeassistant/core.py", line 804, 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 'zcsmower' calls async_create_task from a thread at custom_components/zcsmower/device_tracker.py, line 124: self.hass.async_create_task(. Please report it to the author of the 'zcsmower' custom integration.