Fix statistics registering at start callback (#60963)
This commit is contained in:
parent
b2ee62ba8d
commit
2fe48702f3
1 changed files with 1 additions and 2 deletions
|
@ -243,8 +243,7 @@ class StatisticsSensor(SensorEntity):
|
||||||
self._add_state_to_queue(new_state)
|
self._add_state_to_queue(new_state)
|
||||||
self.async_schedule_update_ha_state(True)
|
self.async_schedule_update_ha_state(True)
|
||||||
|
|
||||||
@callback
|
async def async_stats_sensor_startup(_):
|
||||||
def async_stats_sensor_startup(_):
|
|
||||||
"""Add listener and get recorded state."""
|
"""Add listener and get recorded state."""
|
||||||
_LOGGER.debug("Startup for %s", self.entity_id)
|
_LOGGER.debug("Startup for %s", self.entity_id)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue