mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 09:17:10 +00:00
Fix AssertionError in RainMachine (#75668)
This commit is contained in:
parent
da131beced
commit
a499dfb8ff
@ -243,10 +243,8 @@ class TimeRemainingSensor(RainMachineEntity, RestoreSensor):
|
|||||||
seconds_remaining = self.calculate_seconds_remaining()
|
seconds_remaining = self.calculate_seconds_remaining()
|
||||||
new_timestamp = now + timedelta(seconds=seconds_remaining)
|
new_timestamp = now + timedelta(seconds=seconds_remaining)
|
||||||
|
|
||||||
assert isinstance(self._attr_native_value, datetime)
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
self._attr_native_value
|
isinstance(self._attr_native_value, datetime)
|
||||||
and new_timestamp - self._attr_native_value
|
and new_timestamp - self._attr_native_value
|
||||||
< DEFAULT_ZONE_COMPLETION_TIME_WOBBLE_TOLERANCE
|
< DEFAULT_ZONE_COMPLETION_TIME_WOBBLE_TOLERANCE
|
||||||
):
|
):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user