Fix AssertionError in RainMachine (#75668)

pull/75758/head
Aaron Bach 2022-07-23 20:06:10 -06:00 committed by Franck Nijhof
parent 674a59f138
commit d756936a4e
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
1 changed files with 1 additions and 3 deletions

View File

@ -243,10 +243,8 @@ class TimeRemainingSensor(RainMachineEntity, RestoreSensor):
seconds_remaining = self.calculate_seconds_remaining()
new_timestamp = now + timedelta(seconds=seconds_remaining)
assert isinstance(self._attr_native_value, datetime)
if (
self._attr_native_value
isinstance(self._attr_native_value, datetime)
and new_timestamp - self._attr_native_value
< DEFAULT_ZONE_COMPLETION_TIME_WOBBLE_TOLERANCE
):