(self, camera_type=BlinkCamera)
return True
Update cameras from server.
Update cameras from server.
Update cameras from server .
def update_cameras(self, camera_type=BlinkCamera):
        """Update cameras from server."""
        try:
            for camera_config in self.camera_list:
                if "name" not in camera_config:
                    break
                blink_camera_type = camera_config.get("type", "")
                name = camera_config["name"]
                self.motion[name] = False
                owl_info = self.get_owl_info(name)
                lotus_info = self.get_lotus_info(name)
                if blink_camera_type == "mini":
                    camera_type = BlinkCameraMini
                if blink_camera_type == "lotus":
                    camera_type = BlinkDoorbell
                self.cameras[name] = camera_type(self)
                camera_info = self.get_camera_info(
                    camera_config["id"], owl_info=owl_info, lotus_info=lotus_info
                )
                self.cameras[name].update(camera_info, force_cache=True, force=True)

        except KeyError:
            _LOGGER.error("Could not create camera instances for %s", self.name)
            return False
        return True
def update_cameras ( self , camera_type = BlinkCamera ) : try : for camera_config in self . camera_list : if "name" not in camera_config : break blink_camera_type = camera_config . get ( "type" , "" ) name = camera_config [ "name" ] self . motion [ name ] = False owl_info = self . get_owl_info ( name ) lotus_info = self . get_lotus_info ( name ) if blink_camera_type == "mini" : camera_type = BlinkCameraMini if blink_camera_type == "lotus" : camera_type = BlinkDoorbell self . cameras [ name ] = camera_type ( self ) camera_info = self . get_camera_info ( camera_config [ "id" ] , owl_info = owl_info , lotus_info = lotus_info ) self . cameras [ name ] . update ( camera_info , force_cache = True , force = True ) except KeyError : _LOGGER . error ( "Could not create camera instances for %s" , self . name ) return False return True