Fix missing timezone in GTFS timestamp sensor (#63401)

This commit is contained in:
Franck Nijhof 2022-01-04 22:16:35 +01:00 committed by GitHub
parent cb76a30233
commit 841e22258d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -613,7 +613,9 @@ class GTFSDepartureSensor(SensorEntity):
if not self._departure:
self._state = None
else:
self._state = self._departure["departure_time"]
self._state = self._departure["departure_time"].replace(
tzinfo=dt_util.UTC
)
# Fetch trip and route details once, unless updated
if not self._departure: