@pytest.mark.parametrize('description', CAMERA_SWITCHES_NO_EXTRA)
async def test_switch_camera_simple(hass: HomeAssistant, camera: Camera, description: ProtectSwitchEntityDescription):
    'Tests all simple switches for cameras.'
    assert (description.ufp_set_method is not None)
    camera.__fields__[description.ufp_set_method] = Mock()
    setattr(camera, description.ufp_set_method, AsyncMock())
    set_method = getattr(camera, description.ufp_set_method)
    (_, entity_id) = ids_from_device_description(Platform.SWITCH, camera, description)
    (await hass.services.async_call('switch', 'turn_on', {ATTR_ENTITY_ID: entity_id}, blocking=True))
    set_method.assert_called_once_with(True)
    (await hass.services.async_call('switch', 'turn_off', {ATTR_ENTITY_ID: entity_id}, blocking=True))
    set_method.assert_called_with(False)
Tests all simple switches for cameras.
@pytest.mark.parametrize('description', CAMERA_SWITCHES_NO_EXTRA)
async def test_switch_camera_simple(hass: HomeAssistant, camera: Camera, description: ProtectSwitchEntityDescription):
    
    assert (description.ufp_set_method is not None)
    camera.__fields__[description.ufp_set_method] = Mock()
    setattr(camera, description.ufp_set_method, AsyncMock())
    set_method = getattr(camera, description.ufp_set_method)
    (_, entity_id) = ids_from_device_description(Platform.SWITCH, camera, description)
    (await hass.services.async_call('switch', 'turn_on', {ATTR_ENTITY_ID: entity_id}, blocking=True))
    set_method.assert_called_once_with(True)
    (await hass.services.async_call('switch', 'turn_off', {ATTR_ENTITY_ID: entity_id}, blocking=True))
    set_method.assert_called_with(False)