mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Fix new stats rows creating data in the old created column (#88013)
This commit is contained in:
parent
3d9d79684d
commit
484027023c
@ -537,6 +537,8 @@ class StatisticsBase:
|
|||||||
"""Create object from a statistics."""
|
"""Create object from a statistics."""
|
||||||
return cls( # type: ignore[call-arg]
|
return cls( # type: ignore[call-arg]
|
||||||
metadata_id=metadata_id,
|
metadata_id=metadata_id,
|
||||||
|
created=None,
|
||||||
|
created_ts=time.time(),
|
||||||
start=None,
|
start=None,
|
||||||
start_ts=dt_util.utc_to_timestamp(stats["start"]),
|
start_ts=dt_util.utc_to_timestamp(stats["start"]),
|
||||||
mean=stats.get("mean"),
|
mean=stats.get("mean"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user