mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Fix the negative values bug in history_stats (#7934)
This commit is contained in:
parent
727a22f925
commit
620197b276
@ -179,7 +179,7 @@ class HistoryStatsSensor(Entity):
|
|||||||
end = dt_util.as_utc(end)
|
end = dt_util.as_utc(end)
|
||||||
p_start = dt_util.as_utc(p_start)
|
p_start = dt_util.as_utc(p_start)
|
||||||
p_end = dt_util.as_utc(p_end)
|
p_end = dt_util.as_utc(p_end)
|
||||||
now = dt_util.as_utc(datetime.datetime.now())
|
now = datetime.datetime.now()
|
||||||
|
|
||||||
# Compute integer timestamps
|
# Compute integer timestamps
|
||||||
start_timestamp = math.floor(dt_util.as_timestamp(start))
|
start_timestamp = math.floor(dt_util.as_timestamp(start))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user