mirror of
https://github.com/home-assistant/core.git
synced 2025-08-15 10:31:39 +02:00
tweak
This commit is contained in:
@@ -144,8 +144,10 @@ def row_to_compressed_state(
|
|||||||
}
|
}
|
||||||
row_last_updated_ts: float = row.last_updated_ts
|
row_last_updated_ts: float = row.last_updated_ts
|
||||||
comp_state[COMPRESSED_STATE_LAST_UPDATED] = row_last_updated_ts
|
comp_state[COMPRESSED_STATE_LAST_UPDATED] = row_last_updated_ts
|
||||||
if row_last_updated_ts != (
|
if (
|
||||||
row_changed_changed_ts := getattr(row, "last_changed_ts", None)
|
(row_last_changed_ts := getattr(row, "last_changed_ts", None))
|
||||||
|
and row_last_changed_ts
|
||||||
|
and row_last_updated_ts != row_last_changed_ts
|
||||||
):
|
):
|
||||||
comp_state[COMPRESSED_STATE_LAST_CHANGED] = row_changed_changed_ts
|
comp_state[COMPRESSED_STATE_LAST_CHANGED] = row_last_changed_ts
|
||||||
return comp_state
|
return comp_state
|
||||||
|
Reference in New Issue
Block a user