mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 04:07:08 +00:00
Tibber, correct generate a 0-timestamp (#52165)
* Tibber, correct generate a 0-timestamp * import Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>
This commit is contained in:
parent
a2be9a487f
commit
e039a9d37b
@ -1,6 +1,6 @@
|
||||
"""Support for Tibber sensors."""
|
||||
import asyncio
|
||||
from datetime import datetime, timedelta
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
from random import randrange
|
||||
|
||||
@ -311,7 +311,7 @@ class TibberSensorRT(TibberSensor):
|
||||
"last meter consumption",
|
||||
"last meter production",
|
||||
]:
|
||||
self._attr_last_reset = datetime.fromtimestamp(0)
|
||||
self._attr_last_reset = dt_util.utc_from_timestamp(0)
|
||||
elif self._sensor_name in [
|
||||
"accumulated consumption",
|
||||
"accumulated production",
|
||||
|
Loading…
x
Reference in New Issue
Block a user