mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Deprecate set_doorbell_message
UniFi Protect service (#83675)
This commit is contained in:
parent
101118a60e
commit
b96330df03
@ -32,7 +32,11 @@ from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import ATTR_ENTITY_ID
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
from homeassistant.helpers import config_validation as cv, entity_platform
|
||||
from homeassistant.helpers import (
|
||||
config_validation as cv,
|
||||
entity_platform,
|
||||
issue_registry as ir,
|
||||
)
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||
from homeassistant.helpers.entity import EntityCategory
|
||||
from homeassistant.util.dt import utcnow
|
||||
@ -430,6 +434,20 @@ class ProtectSelects(ProtectDeviceEntity, SelectEntity):
|
||||
async def async_set_doorbell_message(self, message: str, duration: str) -> None:
|
||||
"""Set LCD Message on Doorbell display."""
|
||||
|
||||
ir.async_create_issue(
|
||||
self.hass,
|
||||
DOMAIN,
|
||||
"deprecated_service_set_doorbell_message",
|
||||
breaks_in_ha_version="2023.3.0",
|
||||
is_fixable=True,
|
||||
is_persistent=True,
|
||||
severity=ir.IssueSeverity.WARNING,
|
||||
translation_placeholders={
|
||||
"link": "https://www.home-assistant.io/integrations/text#service-textset_value"
|
||||
},
|
||||
translation_key="deprecated_service_set_doorbell_message",
|
||||
)
|
||||
|
||||
if self.entity_description.device_class != DEVICE_CLASS_LCD_MESSAGE:
|
||||
raise HomeAssistantError("Not a doorbell text select entity")
|
||||
|
||||
|
@ -75,6 +75,17 @@
|
||||
"ea_setup_failed": {
|
||||
"title": "Setup error using Early Access version",
|
||||
"description": "You are using v{version} of UniFi Protect which is an Early Access version. An unrecoverable error occurred while trying to load the integration. Please [downgrade to a stable version](https://www.home-assistant.io/integrations/unifiprotect#downgrading-unifi-protect) of UniFi Protect to continue using the integration.\n\nError: {error}"
|
||||
},
|
||||
"deprecated_service_set_doorbell_message": {
|
||||
"title": "set_doorbell_message is Deprecated",
|
||||
"fix_flow": {
|
||||
"step": {
|
||||
"confirm": {
|
||||
"title": "set_doorbell_message is Deprecated",
|
||||
"description": "The `unifiprotect.set_doorbell_message` service is deprecated in favor of the new Doorbell Text entity added to each Doorbell device. It will be removed in v2023.3.0. Please update to use the [`text.set_value` service]({link})."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"entity": {
|
||||
|
@ -51,9 +51,16 @@
|
||||
}
|
||||
},
|
||||
"issues": {
|
||||
"deprecate_smart_sensor": {
|
||||
"description": "The unified \"Detected Object\" sensor for smart detections is now deprecated. It has been replaced with individual smart detection binary sensors for each smart detection type. Please update any templates or automations accordingly.",
|
||||
"title": "Smart Detection Sensor Deprecated"
|
||||
"deprecated_service_set_doorbell_message": {
|
||||
"fix_flow": {
|
||||
"step": {
|
||||
"confirm": {
|
||||
"description": "The `unifiprotect.set_doorbell_message` service is deprecated in favor of the new Doorbell Text entity added to each Doorbell device. It will be removed in v2023.3.0. Please update to use the [`text.set_value` service]({link}).",
|
||||
"title": "set_doorbell_message is Deprecated"
|
||||
}
|
||||
}
|
||||
},
|
||||
"title": "set_doorbell_message is Deprecated"
|
||||
},
|
||||
"ea_setup_failed": {
|
||||
"description": "You are using v{version} of UniFi Protect which is an Early Access version. An unrecoverable error occurred while trying to load the integration. Please [downgrade to a stable version](https://www.home-assistant.io/integrations/unifiprotect#downgrading-unifi-protect) of UniFi Protect to continue using the integration.\n\nError: {error}",
|
||||
|
Loading…
x
Reference in New Issue
Block a user