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:
parent
62a87b8430
commit
67e199fb2f
5 changed files with 7 additions and 8 deletions
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from pydrawise.schema import Zone
|
|
||||||
|
|
||||||
from homeassistant.components.binary_sensor import (
|
from homeassistant.components.binary_sensor import (
|
||||||
BinarySensorDeviceClass,
|
BinarySensorDeviceClass,
|
||||||
BinarySensorEntity,
|
BinarySensorEntity,
|
||||||
|
@ -65,5 +63,5 @@ class HydrawiseBinarySensor(HydrawiseEntity, BinarySensorEntity):
|
||||||
if self.entity_description.key == "status":
|
if self.entity_description.key == "status":
|
||||||
self._attr_is_on = self.coordinator.last_update_success
|
self._attr_is_on = self.coordinator.last_update_success
|
||||||
elif self.entity_description.key == "is_watering":
|
elif self.entity_description.key == "is_watering":
|
||||||
zone: Zone = self.zone
|
assert self.zone is not None
|
||||||
self._attr_is_on = zone.scheduled_runs.current_run is not None
|
self._attr_is_on = self.zone.scheduled_runs.current_run is not None
|
||||||
|
|
|
@ -6,5 +6,5 @@
|
||||||
"documentation": "https://www.home-assistant.io/integrations/hydrawise",
|
"documentation": "https://www.home-assistant.io/integrations/hydrawise",
|
||||||
"iot_class": "cloud_polling",
|
"iot_class": "cloud_polling",
|
||||||
"loggers": ["pydrawise"],
|
"loggers": ["pydrawise"],
|
||||||
"requirements": ["pydrawise==2024.3.0"]
|
"requirements": ["pydrawise==2024.4.1"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,7 +63,8 @@ class HydrawiseSwitch(HydrawiseEntity, SwitchEntity):
|
||||||
"""Turn the device on."""
|
"""Turn the device on."""
|
||||||
if self.entity_description.key == "manual_watering":
|
if self.entity_description.key == "manual_watering":
|
||||||
await self.coordinator.api.start_zone(
|
await self.coordinator.api.start_zone(
|
||||||
self.zone, custom_run_duration=DEFAULT_WATERING_TIME.total_seconds()
|
self.zone,
|
||||||
|
custom_run_duration=int(DEFAULT_WATERING_TIME.total_seconds()),
|
||||||
)
|
)
|
||||||
elif self.entity_description.key == "auto_watering":
|
elif self.entity_description.key == "auto_watering":
|
||||||
await self.coordinator.api.resume_zone(self.zone)
|
await self.coordinator.api.resume_zone(self.zone)
|
||||||
|
|
|
@ -1779,7 +1779,7 @@ pydiscovergy==3.0.0
|
||||||
pydoods==1.0.2
|
pydoods==1.0.2
|
||||||
|
|
||||||
# homeassistant.components.hydrawise
|
# homeassistant.components.hydrawise
|
||||||
pydrawise==2024.3.0
|
pydrawise==2024.4.1
|
||||||
|
|
||||||
# homeassistant.components.android_ip_webcam
|
# homeassistant.components.android_ip_webcam
|
||||||
pydroid-ipcam==2.0.0
|
pydroid-ipcam==2.0.0
|
||||||
|
|
|
@ -1390,7 +1390,7 @@ pydexcom==0.2.3
|
||||||
pydiscovergy==3.0.0
|
pydiscovergy==3.0.0
|
||||||
|
|
||||||
# homeassistant.components.hydrawise
|
# homeassistant.components.hydrawise
|
||||||
pydrawise==2024.3.0
|
pydrawise==2024.4.1
|
||||||
|
|
||||||
# homeassistant.components.android_ip_webcam
|
# homeassistant.components.android_ip_webcam
|
||||||
pydroid-ipcam==2.0.0
|
pydroid-ipcam==2.0.0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue