From bf3dc896bb1c3e51eb0f265455e7212ec844b872 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 10 Apr 2023 16:55:27 -1000 Subject: [PATCH] remove unused --- homeassistant/components/recorder/history/modern.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/recorder/history/modern.py b/homeassistant/components/recorder/history/modern.py index fb47e680ed7..fc7f65779fd 100644 --- a/homeassistant/components/recorder/history/modern.py +++ b/homeassistant/components/recorder/history/modern.py @@ -729,7 +729,7 @@ def _sorted_states_to_dict( ent_results.extend( { attr_state: (prev_state := state), - attr_time: row[last_updated_ts_idx] or start_time_ts, + attr_time: row[last_updated_ts_idx], } for row in group if (state := row[state_idx]) != prev_state @@ -741,9 +741,7 @@ def _sorted_states_to_dict( ent_results.extend( { attr_state: (prev_state := state), # noqa: F841 - attr_time: _utc_from_timestamp( - row[last_updated_ts_idx] or start_time_ts - ).isoformat(), + attr_time: _utc_from_timestamp(row[last_updated_ts_idx]).isoformat(), } for row in group if (state := row[state_idx]) != prev_state