From 08c8c22fac11b750f75d916d86c7ddf1c3b00c21 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 24 May 2023 11:21:44 -0500 Subject: [PATCH] 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 --- homeassistant/components/xiaomi_aqara/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/xiaomi_aqara/__init__.py b/homeassistant/components/xiaomi_aqara/__init__.py index f51b1a2972b..16c3fa54731 100644 --- a/homeassistant/components/xiaomi_aqara/__init__.py +++ b/homeassistant/components/xiaomi_aqara/__init__.py @@ -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: