mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 21:25:13 +02:00
Fix new stats rows creating data in the old created column (#88013)
This commit is contained in:
@@ -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"),
|
||||||
|
Reference in New Issue
Block a user