From 7b9f7889d2c0fe59812dd1eb9f352373921caaa6 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sat, 25 Feb 2017 15:21:40 -0800 Subject: [PATCH] Fix recorder async (#6228) --- homeassistant/components/recorder/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/recorder/__init__.py b/homeassistant/components/recorder/__init__.py index 0e301f2a87c..0f8d7b48fe2 100644 --- a/homeassistant/components/recorder/__init__.py +++ b/homeassistant/components/recorder/__init__.py @@ -236,7 +236,7 @@ class Recorder(threading.Thread): self._setup_connection() self._setup_run() self.db_ready.set() - self.async_db_ready.set() + self.hass.loop.call_soon_threadsafe(self.async_db_ready.set) break except SQLAlchemyError as err: _LOGGER.error("Error during connection setup: %s (retrying "