Bump pydrawise to 2024.4.1 (#116449)

* Bump pydrawise to 2024.4.1

* Fix typing errors

* Use assert instead of cast

* Remove unused import
This commit is contained in:
David Knowles 2024-05-02 01:56:27 -04:00 committed by GitHub
parent 62a87b8430
commit 67e199fb2f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 7 additions and 8 deletions

View file

@ -2,8 +2,6 @@
from __future__ import annotations
from pydrawise.schema import Zone
from homeassistant.components.binary_sensor import (
BinarySensorDeviceClass,
BinarySensorEntity,
@ -65,5 +63,5 @@ class HydrawiseBinarySensor(HydrawiseEntity, BinarySensorEntity):
if self.entity_description.key == "status":
self._attr_is_on = self.coordinator.last_update_success
elif self.entity_description.key == "is_watering":
zone: Zone = self.zone
self._attr_is_on = zone.scheduled_runs.current_run is not None
assert self.zone is not None
self._attr_is_on = self.zone.scheduled_runs.current_run is not None