From a8cdf36d5c149647fa992f66ae2bfa7d65ef2088 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 11 Oct 2016 00:58:43 -0700 Subject: [PATCH] Update recorder callback (#3812) --- homeassistant/components/recorder/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/recorder/__init__.py b/homeassistant/components/recorder/__init__.py index d1983e8f28f..6feee95be45 100644 --- a/homeassistant/components/recorder/__init__.py +++ b/homeassistant/components/recorder/__init__.py @@ -7,7 +7,6 @@ to query this database. For more details about this component, please refer to the documentation at https://home-assistant.io/components/recorder/ """ -import asyncio import logging import queue import threading @@ -17,7 +16,7 @@ from typing import Any, Union, Optional, List import voluptuous as vol -from homeassistant.core import HomeAssistant +from homeassistant.core import HomeAssistant, callback from homeassistant.const import (EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP, EVENT_STATE_CHANGED, EVENT_TIME_CHANGED, MATCH_ALL) @@ -225,7 +224,7 @@ class Recorder(threading.Thread): self.queue.task_done() - @asyncio.coroutine + @callback def event_listener(self, event): """Listen for new events and put them in the process queue.""" self.queue.put(event)