Remove deprecation issues for LCN once entities removed (#129955)

This commit is contained in:
Joost Lekkerkerker 2024-11-06 17:00:20 +01:00 committed by Franck Nijhof
parent c18d50910f
commit e5a28f4f25
No known key found for this signature in database
GPG key ID: D62583BA8AB11CA3

View file

@ -15,7 +15,11 @@ from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_DOMAIN, CONF_ENTITIES, CONF_SOURCE from homeassistant.const import CONF_DOMAIN, CONF_ENTITIES, CONF_SOURCE
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.issue_registry import IssueSeverity, async_create_issue from homeassistant.helpers.issue_registry import (
IssueSeverity,
async_create_issue,
async_delete_issue,
)
from homeassistant.helpers.typing import ConfigType from homeassistant.helpers.typing import ConfigType
from .const import ( from .const import (
@ -115,6 +119,9 @@ class LcnRegulatorLockSensor(LcnEntity, BinarySensorEntity):
await self.device_connection.cancel_status_request_handler( await self.device_connection.cancel_status_request_handler(
self.setpoint_variable self.setpoint_variable
) )
async_delete_issue(
self.hass, DOMAIN, f"deprecated_binary_sensor_{self.entity_id}"
)
def input_received(self, input_obj: InputType) -> None: def input_received(self, input_obj: InputType) -> None:
"""Set sensor value when LCN input object (command) is received.""" """Set sensor value when LCN input object (command) is received."""
@ -201,6 +208,9 @@ class LcnLockKeysSensor(LcnEntity, BinarySensorEntity):
await super().async_will_remove_from_hass() await super().async_will_remove_from_hass()
if not self.device_connection.is_group: if not self.device_connection.is_group:
await self.device_connection.cancel_status_request_handler(self.source) await self.device_connection.cancel_status_request_handler(self.source)
async_delete_issue(
self.hass, DOMAIN, f"deprecated_binary_sensor_{self.entity_id}"
)
def input_received(self, input_obj: InputType) -> None: def input_received(self, input_obj: InputType) -> None:
"""Set sensor value when LCN input object (command) is received.""" """Set sensor value when LCN input object (command) is received."""