From 6b08e6e769680b4d325c12ed7c7100be4d458407 Mon Sep 17 00:00:00 2001 From: Zellux Wang Date: Tue, 11 Sep 2018 03:25:38 -0600 Subject: [PATCH] Fix arlo intilization when no base station available (#16529) * Fix arlo intilization when no base station * Fix pylint for empty camera check * Fix typo * Minor change to trigger CI again --- homeassistant/components/arlo.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/arlo.py b/homeassistant/components/arlo.py index c6a414b9d91..015e1e0d1fc 100644 --- a/homeassistant/components/arlo.py +++ b/homeassistant/components/arlo.py @@ -61,10 +61,12 @@ def setup(hass, config): arlo_base_station = next(( station for station in arlo.base_stations), None) - if arlo_base_station is None: + if arlo_base_station is not None: + arlo_base_station.refresh_rate = scan_interval.total_seconds() + elif not arlo.cameras: + _LOGGER.error("No Arlo camera or base station available.") return False - arlo_base_station.refresh_rate = scan_interval.total_seconds() hass.data[DATA_ARLO] = arlo except (ConnectTimeout, HTTPError) as ex: