Fix Home Connect datetime comparison (#35501)

This commit is contained in:
David Straub
2020-05-11 19:55:09 +02:00
committed by GitHub
parent 93f8d21bc0
commit d2502f649f

View File

@@ -62,7 +62,7 @@ class HomeConnectSensor(HomeConnectEntity):
elif (
self._state is not None
and self._sign == 1
and self._state < dt_util.utcnow()
and dt_util.parse_datetime(self._state) < dt_util.utcnow()
):
# if the date is supposed to be in the future but we're
# already past it, set state to None.