From 67eeed67036248ed4c9fb7dbe4bcb7e90c1dfc11 Mon Sep 17 00:00:00 2001 From: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> Date: Tue, 18 Jul 2023 15:11:14 +0200 Subject: [PATCH] Rename homekit "Filter Life" sensor to "Filter lifetime" (#96821) * String review: rename 'life' to 'lifetime' - The term life, such as in 'filter life' can be ambiguous. - Renamed to 'lifetime', as quite a few integrations use the term 'lifetime' to express this concept - Improves consistency and should be easier to understand. * HomeKit: adapt test case to reflect string change * Fix test case failure caused by string rename: first step --- homeassistant/components/homekit_controller/sensor.py | 2 +- .../homekit_controller/specific_devices/test_airversa_ap2.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/homekit_controller/sensor.py b/homeassistant/components/homekit_controller/sensor.py index 4d6ad7148d2..d7230de0832 100644 --- a/homeassistant/components/homekit_controller/sensor.py +++ b/homeassistant/components/homekit_controller/sensor.py @@ -333,7 +333,7 @@ SIMPLE_SENSOR: dict[str, HomeKitSensorEntityDescription] = { ), CharacteristicsTypes.FILTER_LIFE_LEVEL: HomeKitSensorEntityDescription( key=CharacteristicsTypes.FILTER_LIFE_LEVEL, - name="Filter Life", + name="Filter lifetime", state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=PERCENTAGE, ), diff --git a/tests/components/homekit_controller/specific_devices/test_airversa_ap2.py b/tests/components/homekit_controller/specific_devices/test_airversa_ap2.py index d1c9398bb24..0091fc098de 100644 --- a/tests/components/homekit_controller/specific_devices/test_airversa_ap2.py +++ b/tests/components/homekit_controller/specific_devices/test_airversa_ap2.py @@ -60,8 +60,8 @@ async def test_airversa_ap2_setup(hass: HomeAssistant) -> None: capabilities={"state_class": SensorStateClass.MEASUREMENT}, ), EntityTestInfo( - entity_id="sensor.airversa_ap2_1808_filter_life", - friendly_name="Airversa AP2 1808 Filter Life", + entity_id="sensor.airversa_ap2_1808_filter_lifetime", + friendly_name="Airversa AP2 1808 Filter lifetime", unique_id="00:00:00:00:00:00_1_32896_32900", state="100.0", capabilities={"state_class": SensorStateClass.MEASUREMENT},