pydrawise.rest
pydrawise.rest
Asynchronous client library for interacting with Hydrawise's REST API.
RestClient
RestClient(auth: RestAuth)
Bases: HydrawiseBase
Async client library for interacting with the Hydrawise v1 REST API.
This should remain compatible with client.Hydrawise.
Initializer.
| Parameters: |
|
|---|
next_poll
instance-attribute
next_poll = timedelta(0)
delete_zone_suspension
async
delete_zone_suspension(suspension: ZoneSuspension) -> None
Not supported by the Hydrawise v1 REST API.
| Parameters: |
|
|---|
| Raises: |
|
|---|
get_controller
async
get_controller(controller_id: int) -> Controller
Not supported by the Hydrawise v1 REST API.
| Parameters: |
|
|---|
| Raises: |
|
|---|
get_controllers
async
get_controllers() -> list[Controller]
Retrieves all controllers associated with the currently authenticated user.
get_sensors
async
get_sensors(controller: Controller) -> list[Sensor]
Not supported by the Hydrawise v1 REST API.
| Raises: |
|
|---|
get_user
async
get_user(fetch_zones: bool = True) -> User
Retrieves the currently authenticated user.
| Parameters: |
|
|---|
get_water_flow_summary
async
get_water_flow_summary(controller: Controller, sensor: Sensor, start: datetime, end: datetime) -> SensorFlowSummary
Not supported by the Hydrawise v1 REST API.
| Raises: |
|
|---|
get_water_use_summary
async
get_water_use_summary(controller: Controller, start: datetime, end: datetime) -> ControllerWaterUseSummary
Not supported by the Hydrawise v1 REST API.
| Raises: |
|
|---|
get_watering_report
async
get_watering_report(controller: Controller, start: datetime, end: datetime) -> list[WateringReportEntry]
Not supported by the Hydrawise v1 REST API.
| Raises: |
|
|---|
get_zone
async
get_zone(zone_id: int) -> Zone
Not supported by the Hydrawise v1 REST API.
| Parameters: |
|
|---|
| Raises: |
|
|---|
get_zones
async
get_zones(controller: Controller) -> list[Zone]
Retrieves zones associated with the given controller.
| Parameters: |
|
|---|
resume_all_zones
async
resume_all_zones(controller: Controller) -> None
Resumes the schedule of all zones attached to the given controller.
| Parameters: |
|
|---|
resume_zone
async
resume_zone(zone: Zone) -> None
Resumes a zone's schedule.
| Parameters: |
|
|---|
start_all_zones
async
start_all_zones(controller: Controller, mark_run_as_scheduled: bool = False, custom_run_duration: int = 0) -> None
Starts all zones attached to a controller.
| Parameters: |
|
|---|
start_zone
async
start_zone(zone: Zone, mark_run_as_scheduled: bool = False, custom_run_duration: int = 0) -> None
Starts a zone's run cycle.
| Parameters: |
|
|---|
stop_all_zones
async
stop_all_zones(controller: Controller) -> None
Stops all zones attached to a controller.
| Parameters: |
|
|---|
stop_zone
async
stop_zone(zone: Zone) -> None
Stops a zone.
| Parameters: |
|
|---|
suspend_all_zones
async
suspend_all_zones(controller: Controller, until: datetime) -> None
Suspends the schedule of all zones attached to a given controller.
| Parameters: |
|
|---|
suspend_zone
async
suspend_zone(zone: Zone, until: datetime) -> None
Suspends a zone's schedule.
| Parameters: |
|
|---|