async def async_setup_entry(hass, config_entry, async_add_entities, discovery_info=None):
    'Set up the Agent cameras.'
    filter_urllib3_logging()
    cameras = []
    server = hass.data[AGENT_DOMAIN][config_entry.entry_id][CONNECTION]
    if (not server.devices):
        _LOGGER.warning('Could not fetch cameras from Agent server')
        return
    for device in server.devices:
        if (device.typeID == 2):
            camera = AgentCamera(device)
            cameras.append(camera)
    async_add_entities(cameras)
    platform = entity_platform.current_platform.get()
    for (service, method) in CAMERA_SERVICES.items():
        platform.async_register_entity_service(service, {}, method)
Set up the Agent cameras.
async def async_setup_entry(hass, config_entry, async_add_entities, discovery_info=None):
    
    filter_urllib3_logging()
    cameras = []
    server = hass.data[AGENT_DOMAIN][config_entry.entry_id][CONNECTION]
    if (not server.devices):
        _LOGGER.warning('Could not fetch cameras from Agent server')
        return
    for device in server.devices:
        if (device.typeID == 2):
            camera = AgentCamera(device)
            cameras.append(camera)
    async_add_entities(cameras)
    platform = entity_platform.current_platform.get()
    for (service, method) in CAMERA_SERVICES.items():
        platform.async_register_entity_service(service, {}, method)