Remove Ezviz detection sensitivity service (#103392)

pull/103582/head
G Johansson 2023-11-07 10:51:11 +01:00 committed by GitHub
parent da1780f9ec
commit ef7a3787bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 44 deletions

View File

@ -33,7 +33,6 @@ from .const import (
ATTR_LEVEL, ATTR_LEVEL,
ATTR_SERIAL, ATTR_SERIAL,
ATTR_SPEED, ATTR_SPEED,
ATTR_TYPE,
CONF_FFMPEG_ARGUMENTS, CONF_FFMPEG_ARGUMENTS,
DATA_COORDINATOR, DATA_COORDINATOR,
DEFAULT_CAMERA_USERNAME, DEFAULT_CAMERA_USERNAME,
@ -45,7 +44,6 @@ from .const import (
DOMAIN, DOMAIN,
SERVICE_ALARM_SOUND, SERVICE_ALARM_SOUND,
SERVICE_ALARM_TRIGGER, SERVICE_ALARM_TRIGGER,
SERVICE_DETECTION_SENSITIVITY,
SERVICE_PTZ, SERVICE_PTZ,
SERVICE_WAKE_DEVICE, SERVICE_WAKE_DEVICE,
) )
@ -157,15 +155,6 @@ async def async_setup_entry(
"perform_alarm_sound", "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): class EzvizCamera(EzvizEntity, Camera):
"""An implementation of a EZVIZ security camera.""" """An implementation of a EZVIZ security camera."""
@ -329,25 +318,3 @@ class EzvizCamera(EzvizEntity, Camera):
raise HTTPError( raise HTTPError(
"Cannot set alarm sound level for on movement detected" "Cannot set alarm sound level for on movement detected"
) from err ) 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",
)

View File

@ -60,17 +60,6 @@
} }
}, },
"issues": { "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": { "service_deprecation_alarm_sound_level": {
"title": "Ezviz Alarm sound level service is being removed", "title": "Ezviz Alarm sound level service is being removed",
"fix_flow": { "fix_flow": {