ualex73 / monitor_docker

Monitor Docker containers from Home Assistant
Apache License 2.0
267 stars 34 forks source link

Custom integration 'monitor_docker' calls async_write_ha_state #145

Closed dapuzz closed 1 month ago

dapuzz commented 1 month ago

Just installed 2024.5 and logs say:

Detected that custom integration 'monitor_docker' calls async_write_ha_state from a thread at custom_components/monitor_docker/switch.py, line 227: self.async_schedule_update_ha_state().

Please report it to the author of the 'monitor_docker' custom integration.

So.... Here I am! :-)

SAOPP commented 1 month ago

Yep, the same ova here:

[Docker] esphome-updater: Container not available anymore (3) (Detected that custom integration 'monitor_docker' calls async_write_ha_state from a thread at custom_components/monitor_docker/switch.py, line 227: self.async_schedule_update_ha_state(). Please report it to the author of the 'monitor_docker' custom integration.)
Traceback (most recent call last):
  File "/config/custom_components/monitor_docker/helpers.py", line 757, in _run
    self._notify()
  File "/config/custom_components/monitor_docker/helpers.py", line 1310, in _notify
    callback()
  File "/config/custom_components/monitor_docker/switch.py", line 227, in event_callback
    self.async_schedule_update_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1258, in async_schedule_update_ha_state
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1008, in async_write_ha_state
    self.hass.verify_event_loop_thread("async_write_ha_state")
  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 'monitor_docker' calls async_write_ha_state from a thread at custom_components/monitor_docker/switch.py, line 227: self.async_schedule_update_ha_state(). Please report it to the author of the 'monitor_docker' custom integration.

HA 2024.5.2.

SAOPP commented 1 month ago

@dapuzz I changed the repo to master as mentioned here: https://github.com/ualex73/monitor_docker/issues/144#issuecomment-2092560979 ...and it's works!

ualex73 commented 1 month ago

I released the master as v1.15. I will close this ticket, please reopen if you find another issue.