diff --git a/homeassistant/components/camera/arlo.py b/homeassistant/components/camera/arlo.py index 637b0dfc2e6355..80833e34b207e9 100644 --- a/homeassistant/components/camera/arlo.py +++ b/homeassistant/components/camera/arlo.py @@ -49,7 +49,6 @@ def __init__(self, hass, camera, device_info): """Initialize an Arlo camera.""" super().__init__() self._camera = camera - self._base_stn = hass.data[DATA_ARLO].base_stations[0] self._name = self._camera.name self._motion_status = False self._ffmpeg = hass.data[DATA_FFMPEG] @@ -103,7 +102,16 @@ def motion_detection_enabled(self): def set_base_station_mode(self, mode): """Set the mode in the base station.""" - self._base_stn.mode = mode + # Get the list of base stations identified by library + base_stations = self.hass.data[DATA_ARLO].base_stations + + # Some Arlo cameras does not have basestation + # So check if there is base station detected first + # if yes, then choose the primary base station + # Set the mode on the chosen base station + if base_stations: + primary_base_station = base_stations[0] + primary_base_station.mode = mode def enable_motion_detection(self): """Enable the Motion detection in base station (Arm)."""