1
mirror of https://github.com/home-assistant/core synced 2024-10-07 10:13:38 +02:00

Fix non threadsafe call in xiaomi_aqara again (#93461)

Fix non threadsafe call in xiaomi_aqara

The original fix in #93405 was ineffective and only moved the problem

fixes #93400
This commit is contained in:
J. Nick Koston 2023-05-24 11:21:44 -05:00 committed by GitHub
parent d2d21b4158
commit 08c8c22fac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -354,7 +354,7 @@ class XiaomiDevice(Entity):
def push_data(self, data: dict[str, Any], raw_data: dict[Any, Any]) -> None:
"""Push from Hub running in another thread."""
self.hass.loop.call_soon(self.async_push_data, data, raw_data)
self.hass.loop.call_soon_threadsafe(self.async_push_data, data, raw_data)
@callback
def async_push_data(self, data: dict[str, Any], raw_data: dict[Any, Any]) -> None: