From ef7a3787bb5c0ab3cb518a4981a81c9f1ba2300d Mon Sep 17 00:00:00 2001 From: G Johansson Date: Tue, 7 Nov 2023 10:51:11 +0100 Subject: [PATCH] Remove Ezviz detection sensitivity service (#103392) --- homeassistant/components/ezviz/camera.py | 33 --------------------- homeassistant/components/ezviz/strings.json | 11 ------- 2 files changed, 44 deletions(-) diff --git a/homeassistant/components/ezviz/camera.py b/homeassistant/components/ezviz/camera.py index 85b1f316a7b..e42968603e4 100644 --- a/homeassistant/components/ezviz/camera.py +++ b/homeassistant/components/ezviz/camera.py @@ -33,7 +33,6 @@ from .const import ( ATTR_LEVEL, ATTR_SERIAL, ATTR_SPEED, - ATTR_TYPE, CONF_FFMPEG_ARGUMENTS, DATA_COORDINATOR, DEFAULT_CAMERA_USERNAME, @@ -45,7 +44,6 @@ from .const import ( DOMAIN, SERVICE_ALARM_SOUND, SERVICE_ALARM_TRIGGER, - SERVICE_DETECTION_SENSITIVITY, SERVICE_PTZ, SERVICE_WAKE_DEVICE, ) @@ -157,15 +155,6 @@ async def async_setup_entry( "perform_alarm_sound", ) - platform.async_register_entity_service( - SERVICE_DETECTION_SENSITIVITY, - { - vol.Required(ATTR_LEVEL): cv.positive_int, - vol.Required(ATTR_TYPE): cv.positive_int, - }, - "perform_set_alarm_detection_sensibility", - ) - class EzvizCamera(EzvizEntity, Camera): """An implementation of a EZVIZ security camera.""" @@ -329,25 +318,3 @@ class EzvizCamera(EzvizEntity, Camera): raise HTTPError( "Cannot set alarm sound level for on movement detected" ) from err - - def perform_set_alarm_detection_sensibility( - self, level: int, type_value: int - ) -> None: - """Set camera detection sensibility level service.""" - try: - self.coordinator.ezviz_client.detection_sensibility( - self._serial, level, type_value - ) - except (HTTPError, PyEzvizError) as err: - raise PyEzvizError("Cannot set detection sensitivity level") from err - - ir.async_create_issue( - self.hass, - DOMAIN, - "service_depreciation_detection_sensibility", - breaks_in_ha_version="2023.12.0", - is_fixable=True, - is_persistent=True, - severity=ir.IssueSeverity.WARNING, - translation_key="service_depreciation_detection_sensibility", - ) diff --git a/homeassistant/components/ezviz/strings.json b/homeassistant/components/ezviz/strings.json index 11144f8ae71..11ec31fee4a 100644 --- a/homeassistant/components/ezviz/strings.json +++ b/homeassistant/components/ezviz/strings.json @@ -60,17 +60,6 @@ } }, "issues": { - "service_depreciation_detection_sensibility": { - "title": "Ezviz Detection sensitivity service is being removed", - "fix_flow": { - "step": { - "confirm": { - "title": "[%key:component::ezviz::issues::service_depreciation_detection_sensibility::title%]", - "description": "The Ezviz Detection sensitivity service is deprecated and will be removed in Home Assistant 2023.12.\nTo set the sensitivity, you can instead use the `number.set_value` service targetting the Detection sensitivity entity.\n\nPlease remove this service from your automations and scripts and select **submit** to close this issue." - } - } - } - }, "service_deprecation_alarm_sound_level": { "title": "Ezviz Alarm sound level service is being removed", "fix_flow": {