Add entity services to the Hydrawise integration (#120883)

* Add services to the Hydrawise integration

* Add validation of duration ranges

* Remove clamping test

* Fix duration type in test

* Changes requested during review

* Add back the HydrawiseZoneBinarySensor class
This commit is contained in:
David Knowles 2024-07-26 11:25:56 -04:00 committed by GitHub
parent 49e2bfae31
commit 7820bcf218
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 210 additions and 5 deletions

View file

@ -5,9 +5,6 @@ import logging
LOGGER = logging.getLogger(__package__)
ALLOWED_WATERING_TIME = [5, 10, 15, 30, 45, 60]
CONF_WATERING_TIME = "watering_minutes"
DOMAIN = "hydrawise"
DEFAULT_WATERING_TIME = timedelta(minutes=15)
@ -16,3 +13,10 @@ MANUFACTURER = "Hydrawise"
SCAN_INTERVAL = timedelta(seconds=30)
SIGNAL_UPDATE_HYDRAWISE = "hydrawise_update"
SERVICE_RESUME = "resume"
SERVICE_START_WATERING = "start_watering"
SERVICE_SUSPEND = "suspend"
ATTR_DURATION = "duration"
ATTR_UNTIL = "until"