From 80582a128a27d2af17939b3d532fdebe82344897 Mon Sep 17 00:00:00 2001 From: G Johansson Date: Thu, 3 Oct 2024 22:27:01 +0200 Subject: [PATCH] Fix preview available in statistics (#127349) --- homeassistant/components/statistics/sensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/statistics/sensor.py b/homeassistant/components/statistics/sensor.py index b0a0dddd05d..ba98fe3ec6e 100644 --- a/homeassistant/components/statistics/sensor.py +++ b/homeassistant/components/statistics/sensor.py @@ -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