From 4a915cc08f3492dfd9e6ebc094ea594758ec5d66 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Thu, 9 Jul 2026 12:29:56 +0200 Subject: [PATCH] Use last_changed_timestamp directly in history_stats (#175528) --- homeassistant/components/history_stats/data.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/homeassistant/components/history_stats/data.py b/homeassistant/components/history_stats/data.py index 1f132870af14..76ed224b5f78 100644 --- a/homeassistant/components/history_stats/data.py +++ b/homeassistant/components/history_stats/data.py @@ -197,8 +197,7 @@ class HistoryStats: finally: self._query_count -= 1 self._history_current_period = [ - HistoryState(state.state, state.last_changed.timestamp()) - for state in states + HistoryState(state.state, state.last_changed_timestamp) for state in states ] def _state_changes_during_period(