From 5ddf21e4daf7e6678e8dca36f5c8d220ec10b0bd Mon Sep 17 00:00:00 2001 From: Jan Bouwhuis Date: Fri, 3 May 2024 00:04:58 +0200 Subject: [PATCH] Cleanup MQTT sensor last_reset_topic config parameter a year after removal (#116657) --- homeassistant/components/mqtt/abbreviations.py | 1 - homeassistant/components/mqtt/sensor.py | 7 ------- 2 files changed, 8 deletions(-) diff --git a/homeassistant/components/mqtt/abbreviations.py b/homeassistant/components/mqtt/abbreviations.py index 5fadf6ba590..c3efe5667ad 100644 --- a/homeassistant/components/mqtt/abbreviations.py +++ b/homeassistant/components/mqtt/abbreviations.py @@ -86,7 +86,6 @@ ABBREVIATIONS = { "json_attr": "json_attributes", "json_attr_t": "json_attributes_topic", "json_attr_tpl": "json_attributes_template", - "lrst_t": "last_reset_topic", "lrst_val_tpl": "last_reset_value_template", "max": "max", "min": "min", diff --git a/homeassistant/components/mqtt/sensor.py b/homeassistant/components/mqtt/sensor.py index 9ba6308e07c..5457011d122 100644 --- a/homeassistant/components/mqtt/sensor.py +++ b/homeassistant/components/mqtt/sensor.py @@ -58,7 +58,6 @@ from .models import ( _LOGGER = logging.getLogger(__name__) CONF_EXPIRE_AFTER = "expire_after" -CONF_LAST_RESET_TOPIC = "last_reset_topic" CONF_LAST_RESET_VALUE_TEMPLATE = "last_reset_value_template" CONF_SUGGESTED_DISPLAY_PRECISION = "suggested_display_precision" @@ -101,17 +100,11 @@ def validate_sensor_state_class_config(config: ConfigType) -> ConfigType: PLATFORM_SCHEMA_MODERN = vol.All( - # Deprecated in HA Core 2021.11.0 https://github.com/home-assistant/core/pull/54840 - # Removed in HA Core 2023.6.0 - cv.removed(CONF_LAST_RESET_TOPIC), _PLATFORM_SCHEMA_BASE, validate_sensor_state_class_config, ) DISCOVERY_SCHEMA = vol.All( - # Deprecated in HA Core 2021.11.0 https://github.com/home-assistant/core/pull/54840 - # Removed in HA Core 2023.6.0 - cv.removed(CONF_LAST_RESET_TOPIC), _PLATFORM_SCHEMA_BASE.extend({}, extra=vol.REMOVE_EXTRA), validate_sensor_state_class_config, )