Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Detected that custom integration 'localtuya' calls async_dispatcher_send from a thread other than the event loop #264

Closed
3 tasks
Sdahl1234 opened this issue Jun 6, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Sdahl1234
Copy link

LocalTuya Version

2024.5.0 and Master

Home Assistant Version

2024.6.0

Environment

  • Does the device work using the Home Assistant Tuya Cloud component?
  • Is this device connected to another local integration, including Home Assistant and any other tools?
  • The devices are within the same HA subnet, and they get discovered automatically when I add them

What happened?

Warnings in log. Everything seems to work fine

Steps to reproduce.

Nothing

Relevant log output

2024-06-06 16:21:37.346 WARNING (SyncWorker_52) [homeassistant.helpers.frame] Detected that custom integration 'localtuya' calls async_dispatcher_send 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/#async_dispatcher_send at custom_components/localtuya/coordinator.py, line 446: async_dispatcher_send(self._hass, signal, None), please report it to the author of the 'localtuya' custom integration
2024-06-06 16:21:37.350 ERROR (MainThread) [homeassistant] 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/localtuya/coordinator.py", line 446, in _shutdown_entities
    async_dispatcher_send(self._hass, signal, None)
  File "/usr/src/homeassistant/homeassistant/helpers/dispatcher.py", line 214, in async_dispatcher_send
    hass.verify_event_loop_thread("async_dispatcher_send")
  File "/usr/src/homeassistant/homeassistant/core.py", line 447, in verify_event_loop_thread
    frame.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 'localtuya' calls async_dispatcher_send 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/#async_dispatcher_send at custom_components/localtuya/coordinator.py, line 446: async_dispatcher_send(self._hass, signal, None). Please report it to the author of the 'localtuya' custom integration.

Diagnostics information.

No response

@Sdahl1234 Sdahl1234 added the bug Something isn't working label Jun 6, 2024
@Sdahl1234
Copy link
Author

xZetsubou added a commit that referenced this issue Jun 7, 2024
@xZetsubou xZetsubou added the master/next-release Fixed in master branch, Will be ready in the next release label Jun 7, 2024
Copy link

github-actions bot commented Jun 7, 2024

This issue was closed because it was resolved on the release: 2024.6.0

@github-actions github-actions bot added stale and removed master/next-release Fixed in master branch, Will be ready in the next release stale labels Jun 7, 2024
@github-actions github-actions bot closed this as completed Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants