From c15445159d8e853835e8c204bc3398b2690b7861 Mon Sep 17 00:00:00 2001 From: Aaron Bach Date: Thu, 20 Dec 2018 14:51:10 -0700 Subject: [PATCH] Add timeout to RainMachine login (#19476) * Add timeout to RainMachine login * Moved timeout logic to regenmaschine * Moving logic back into try/except * Bumped requirements --- homeassistant/components/rainmachine/__init__.py | 5 ++--- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/rainmachine/__init__.py b/homeassistant/components/rainmachine/__init__.py index 6e1b8b68437..4eb9e390d71 100644 --- a/homeassistant/components/rainmachine/__init__.py +++ b/homeassistant/components/rainmachine/__init__.py @@ -24,7 +24,7 @@ from .config_flow import configured_instances from .const import ( DATA_CLIENT, DEFAULT_PORT, DEFAULT_SCAN_INTERVAL, DEFAULT_SSL, DOMAIN) -REQUIREMENTS = ['regenmaschine==1.0.7'] +REQUIREMENTS = ['regenmaschine==1.1.0'] _LOGGER = logging.getLogger(__name__) @@ -164,8 +164,7 @@ async def async_setup_entry(hass, config_entry): CONF_MONITORED_CONDITIONS, list(BINARY_SENSORS)), config_entry.data.get(CONF_SENSORS, {}).get( CONF_MONITORED_CONDITIONS, list(SENSORS)), - config_entry.data.get(CONF_ZONE_RUN_TIME, DEFAULT_ZONE_RUN) - ) + config_entry.data.get(CONF_ZONE_RUN_TIME, DEFAULT_ZONE_RUN)) await rainmachine.async_update() except RainMachineError as err: _LOGGER.error('An error occurred: %s', err) diff --git a/requirements_all.txt b/requirements_all.txt index b3596d65cd5..0a2ad21d41c 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1390,7 +1390,7 @@ raincloudy==0.0.5 # raspihats==2.2.3 # homeassistant.components.rainmachine -regenmaschine==1.0.7 +regenmaschine==1.1.0 # homeassistant.components.python_script restrictedpython==4.0b7 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index deda940d5d0..6a74bb2f1f7 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -224,7 +224,7 @@ pyunifi==2.13 pywebpush==1.6.0 # homeassistant.components.rainmachine -regenmaschine==1.0.7 +regenmaschine==1.1.0 # homeassistant.components.python_script restrictedpython==4.0b7