Use UTC timestamp in uptime sensor (#60240)

This commit is contained in:
Franck Nijhof
2021-11-24 15:00:54 +01:00
committed by GitHub
parent 5a8cbb8cab
commit fa34153b20

View File

@@ -50,4 +50,4 @@ class UptimeSensor(SensorEntity):
self._attr_name: str = name
self._attr_device_class: str = DEVICE_CLASS_TIMESTAMP
self._attr_should_poll: bool = False
self._attr_native_value = dt_util.now()
self._attr_native_value = dt_util.utcnow()