From 3caaf2931fae05d63475e8171d864b620c1a87cc Mon Sep 17 00:00:00 2001 From: Aaron Bach Date: Thu, 4 Jan 2024 13:50:45 -0700 Subject: [PATCH] Clean up outdated entity replacement logic in Guardian (#107160) --- homeassistant/components/guardian/binary_sensor.py | 3 --- homeassistant/components/guardian/util.py | 8 ++------ 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/homeassistant/components/guardian/binary_sensor.py b/homeassistant/components/guardian/binary_sensor.py index abe005aae33..6b58e70e45d 100644 --- a/homeassistant/components/guardian/binary_sensor.py +++ b/homeassistant/components/guardian/binary_sensor.py @@ -98,9 +98,6 @@ async def async_setup_entry( EntityDomainReplacementStrategy( BINARY_SENSOR_DOMAIN, f"{uid}_ap_enabled", - f"switch.guardian_valve_controller_{uid}_onboard_ap", - "2022.12.0", - remove_old_entity=True, ), ), ) diff --git a/homeassistant/components/guardian/util.py b/homeassistant/components/guardian/util.py index ff41c6e4936..400cd472446 100644 --- a/homeassistant/components/guardian/util.py +++ b/homeassistant/components/guardian/util.py @@ -29,9 +29,6 @@ class EntityDomainReplacementStrategy: old_domain: str old_unique_id: str - replacement_entity_id: str - breaks_in_ha_version: str - remove_old_entity: bool = True @callback @@ -55,9 +52,8 @@ def async_finish_entity_domain_replacements( continue old_entity_id = registry_entry.entity_id - if strategy.remove_old_entity: - LOGGER.info('Removing old entity: "%s"', old_entity_id) - ent_reg.async_remove(old_entity_id) + LOGGER.info('Removing old entity: "%s"', old_entity_id) + ent_reg.async_remove(old_entity_id) class GuardianDataUpdateCoordinator(DataUpdateCoordinator[dict]):