1
mirror of https://github.com/home-assistant/core synced 2024-07-12 07:21:24 +02:00

Parse Risco event time as local (#63395)

This commit is contained in:
On Freund 2022-01-04 20:57:21 +02:00 committed by GitHub
parent 048d8f9263
commit 8c756f4b41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -99,7 +99,9 @@ class RiscoSensor(CoordinatorEntity, SensorEntity):
if self._event is None:
return None
return dt_util.parse_datetime(self._event.time).astimezone(dt_util.UTC)
return dt_util.parse_datetime(self._event.time).replace(
tzinfo=dt_util.DEFAULT_TIME_ZONE
)
@property
def extra_state_attributes(self):