mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Fix preview available in statistics (#127349)
This commit is contained in:
parent
db494de809
commit
80582a128a
@ -385,7 +385,7 @@ class StatisticsSensor(SensorEntity):
|
||||
if not self._source_entity_id or (
|
||||
self._samples_max_buffer_size is None and self._samples_max_age is None
|
||||
):
|
||||
self._attr_available = False
|
||||
self._available = False
|
||||
calculated_state = self._async_calculate_state()
|
||||
preview_callback(calculated_state.state, calculated_state.attributes)
|
||||
return self._call_on_remove_callbacks
|
||||
|
Loading…
x
Reference in New Issue
Block a user