Fix statistics registering at start callback (#60963)

This commit is contained in:
Paulus Schoutsen 2021-12-04 00:17:13 -08:00 committed by GitHub
parent b2ee62ba8d
commit 2fe48702f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)