Bump regenmaschine
to 2022.08.0 (#76483)
This commit is contained in:
parent
36d6ef6228
commit
acbeb8c881
4 changed files with 17 additions and 5 deletions
|
@ -31,6 +31,7 @@ from homeassistant.helpers import (
|
|||
)
|
||||
from homeassistant.helpers.entity import DeviceInfo
|
||||
from homeassistant.helpers.update_coordinator import CoordinatorEntity, UpdateFailed
|
||||
from homeassistant.util.dt import as_timestamp, utcnow
|
||||
from homeassistant.util.network import is_ip_address
|
||||
|
||||
from .config_flow import get_client_controller
|
||||
|
@ -299,7 +300,13 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
async def async_restrict_watering(call: ServiceCall) -> None:
|
||||
"""Restrict watering for a time period."""
|
||||
controller = async_get_controller_for_service_call(hass, call)
|
||||
await controller.restrictions.restrict(call.data[CONF_DURATION])
|
||||
duration = call.data[CONF_DURATION]
|
||||
await controller.restrictions.set_universal(
|
||||
{
|
||||
"rainDelayStartTime": round(as_timestamp(utcnow())),
|
||||
"rainDelayDuration": duration.total_seconds(),
|
||||
},
|
||||
)
|
||||
await async_update_programs_and_zones(hass, entry)
|
||||
|
||||
async def async_stop_all(call: ServiceCall) -> None:
|
||||
|
@ -317,7 +324,12 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
async def async_unrestrict_watering(call: ServiceCall) -> None:
|
||||
"""Unrestrict watering."""
|
||||
controller = async_get_controller_for_service_call(hass, call)
|
||||
await controller.restrictions.unrestrict()
|
||||
await controller.restrictions.set_universal(
|
||||
{
|
||||
"rainDelayStartTime": round(as_timestamp(utcnow())),
|
||||
"rainDelayDuration": 0,
|
||||
},
|
||||
)
|
||||
await async_update_programs_and_zones(hass, entry)
|
||||
|
||||
for service_name, schema, method in (
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"name": "RainMachine",
|
||||
"config_flow": true,
|
||||
"documentation": "https://www.home-assistant.io/integrations/rainmachine",
|
||||
"requirements": ["regenmaschine==2022.07.3"],
|
||||
"requirements": ["regenmaschine==2022.08.0"],
|
||||
"codeowners": ["@bachya"],
|
||||
"iot_class": "local_polling",
|
||||
"homekit": {
|
||||
|
|
|
@ -2082,7 +2082,7 @@ raincloudy==0.0.7
|
|||
raspyrfm-client==1.2.8
|
||||
|
||||
# homeassistant.components.rainmachine
|
||||
regenmaschine==2022.07.3
|
||||
regenmaschine==2022.08.0
|
||||
|
||||
# homeassistant.components.renault
|
||||
renault-api==0.1.11
|
||||
|
|
|
@ -1409,7 +1409,7 @@ radios==0.1.1
|
|||
radiotherm==2.1.0
|
||||
|
||||
# homeassistant.components.rainmachine
|
||||
regenmaschine==2022.07.3
|
||||
regenmaschine==2022.08.0
|
||||
|
||||
# homeassistant.components.renault
|
||||
renault-api==0.1.11
|
||||
|
|
Loading…
Add table
Reference in a new issue