diff --git a/homeassistant/components/recorder/models/state.py b/homeassistant/components/recorder/models/state.py index 14c3444f641..b6c6ba0897c 100644 --- a/homeassistant/components/recorder/models/state.py +++ b/homeassistant/components/recorder/models/state.py @@ -144,7 +144,7 @@ def row_to_compressed_state( COMPRESSED_STATE_STATE: row.state, COMPRESSED_STATE_ATTRIBUTES: decode_attributes_from_row(row, attr_cache), } - row_last_updated_ts: float = row.last_updated_ts or start_time_ts + row_last_updated_ts: float = row.last_updated_ts or start_time_ts # type: ignore[assignment] comp_state[COMPRESSED_STATE_LAST_UPDATED] = row_last_updated_ts if ( (row_last_changed_ts := getattr(row, "last_changed_ts", None))