From 2fe48702f38d76e41607db89478cf2b2ad18e84e Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sat, 4 Dec 2021 00:17:13 -0800 Subject: [PATCH] Fix statistics registering at start callback (#60963) --- homeassistant/components/statistics/sensor.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/homeassistant/components/statistics/sensor.py b/homeassistant/components/statistics/sensor.py index 23a4a31d936..a931a4cf806 100644 --- a/homeassistant/components/statistics/sensor.py +++ b/homeassistant/components/statistics/sensor.py @@ -243,8 +243,7 @@ class StatisticsSensor(SensorEntity): self._add_state_to_queue(new_state) self.async_schedule_update_ha_state(True) - @callback - def async_stats_sensor_startup(_): + async def async_stats_sensor_startup(_): """Add listener and get recorded state.""" _LOGGER.debug("Startup for %s", self.entity_id)