mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 12:47: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."""
|
"""Support for Tibber sensors."""
|
||||||
import asyncio
|
import asyncio
|
||||||
from datetime import datetime, timedelta
|
from datetime import timedelta
|
||||||
import logging
|
import logging
|
||||||
from random import randrange
|
from random import randrange
|
||||||
|
|
||||||
@ -311,7 +311,7 @@ class TibberSensorRT(TibberSensor):
|
|||||||
"last meter consumption",
|
"last meter consumption",
|
||||||
"last meter production",
|
"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 [
|
elif self._sensor_name in [
|
||||||
"accumulated consumption",
|
"accumulated consumption",
|
||||||
"accumulated production",
|
"accumulated production",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user