diff --git a/homeassistant/components/rainmachine/__init__.py b/homeassistant/components/rainmachine/__init__.py index 1879b33e949a4004cfe808afddbb194f43b674cf..b72fe0fb25dea7bafd2b58b3a8a74e9d479b3f0c 100644 --- a/homeassistant/components/rainmachine/__init__.py +++ b/homeassistant/components/rainmachine/__init__.py @@ -55,6 +55,14 @@ CONFIG_SCHEMA = cv.deprecated(DOMAIN) PLATFORMS = ["binary_sensor", "sensor", "switch"] +UPDATE_INTERVALS = { + DATA_PROVISION_SETTINGS: timedelta(minutes=1), + DATA_PROGRAMS: timedelta(seconds=30), + DATA_RESTRICTIONS_CURRENT: timedelta(minutes=1), + DATA_RESTRICTIONS_UNIVERSAL: timedelta(minutes=1), + DATA_ZONES: timedelta(seconds=15), +} + # Constants expected by the RainMachine API for Service Data CONF_CONDITION = "condition" CONF_DEWPOINT = "dewpoint" @@ -230,7 +238,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: hass, LOGGER, name=f'{controller.name} ("{api_category}")', - update_interval=DEFAULT_UPDATE_INTERVAL, + update_interval=UPDATE_INTERVALS[api_category], update_method=partial(async_update, api_category), ) controller_init_tasks.append(coordinator.async_refresh()) diff --git a/homeassistant/components/rainmachine/manifest.json b/homeassistant/components/rainmachine/manifest.json index 307cd7681f51c97599d9460f9e4e7518ca177a59..b6dc4e5c1db605f0a67a9edd725c25d0352135f0 100644 --- a/homeassistant/components/rainmachine/manifest.json +++ b/homeassistant/components/rainmachine/manifest.json @@ -3,7 +3,7 @@ "name": "RainMachine", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/rainmachine", - "requirements": ["regenmaschine==3.2.0"], + "requirements": ["regenmaschine==2021.10.0"], "codeowners": ["@bachya"], "iot_class": "local_polling", "homekit": { diff --git a/requirements_all.txt b/requirements_all.txt index 866ebdc8d295b36e92dc5ae10a90a62799863599..79515f9abecd2a0f958eaa226fd3b0fd49f6925a 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2040,7 +2040,7 @@ raincloudy==0.0.7 raspyrfm-client==1.2.8 # homeassistant.components.rainmachine -regenmaschine==3.2.0 +regenmaschine==2021.10.0 # homeassistant.components.renault renault-api==0.1.4 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index a11eb5c9fff41a9c371648ee03629b4fa54d9c97..091a8cebbbc1ab67d9b75289cf495539e9757201 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1190,7 +1190,7 @@ pyzerproc==0.4.8 rachiopy==1.0.3 # homeassistant.components.rainmachine -regenmaschine==3.2.0 +regenmaschine==2021.10.0 # homeassistant.components.renault renault-api==0.1.4