Fix the negative values bug in history_stats (#7934)
This commit is contained in:
parent
727a22f925
commit
620197b276
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue