Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump pydrawise to 2024.4.1 #116449

Merged
merged 4 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 2 additions & 4 deletions homeassistant/components/hydrawise/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

from __future__ import annotations

from pydrawise.schema import Zone

from homeassistant.components.binary_sensor import (
BinarySensorDeviceClass,
BinarySensorEntity,
Expand Down Expand Up @@ -65,5 +63,5 @@ def _update_attrs(self) -> None:
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
2 changes: 1 addition & 1 deletion homeassistant/components/hydrawise/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"documentation": "https://www.home-assistant.io/integrations/hydrawise",
"iot_class": "cloud_polling",
"loggers": ["pydrawise"],
"requirements": ["pydrawise==2024.3.0"]
"requirements": ["pydrawise==2024.4.1"]
}
3 changes: 2 additions & 1 deletion homeassistant/components/hydrawise/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ async def async_turn_on(self, **kwargs: Any) -> None:
"""Turn the device on."""
if self.entity_description.key == "manual_watering":
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":
await self.coordinator.api.resume_zone(self.zone)
Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1776,7 +1776,7 @@ pydiscovergy==3.0.0
pydoods==1.0.2

# homeassistant.components.hydrawise
pydrawise==2024.3.0
pydrawise==2024.4.1

# homeassistant.components.android_ip_webcam
pydroid-ipcam==2.0.0
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1387,7 +1387,7 @@ pydexcom==0.2.3
pydiscovergy==3.0.0

# homeassistant.components.hydrawise
pydrawise==2024.3.0
pydrawise==2024.4.1

# homeassistant.components.android_ip_webcam
pydroid-ipcam==2.0.0
Expand Down