From aa13082ce0dd9fb29e631c9280449428822d8000 Mon Sep 17 00:00:00 2001 From: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> Date: Tue, 18 Jul 2023 10:13:33 +0200 Subject: [PATCH] Rename 'life' to 'lifetime' in Xiaomi Miio (#96817) 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. --- homeassistant/components/xiaomi_miio/sensor.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/xiaomi_miio/sensor.py b/homeassistant/components/xiaomi_miio/sensor.py index b28f06eb97d6e5..86c7905848a558 100644 --- a/homeassistant/components/xiaomi_miio/sensor.py +++ b/homeassistant/components/xiaomi_miio/sensor.py @@ -293,7 +293,7 @@ class XiaomiMiioSensorDescription(SensorEntityDescription): ), ATTR_FILTER_LIFE_REMAINING: XiaomiMiioSensorDescription( key=ATTR_FILTER_LIFE_REMAINING, - name="Filter life remaining", + name="Filter lifetime remaining", native_unit_of_measurement=PERCENTAGE, icon="mdi:air-filter", state_class=SensorStateClass.MEASUREMENT, @@ -311,7 +311,7 @@ class XiaomiMiioSensorDescription(SensorEntityDescription): ), ATTR_FILTER_LEFT_TIME: XiaomiMiioSensorDescription( key=ATTR_FILTER_LEFT_TIME, - name="Filter time left", + name="Filter lifetime left", native_unit_of_measurement=UnitOfTime.DAYS, icon="mdi:clock-outline", device_class=SensorDeviceClass.DURATION, @@ -320,7 +320,7 @@ class XiaomiMiioSensorDescription(SensorEntityDescription): ), ATTR_DUST_FILTER_LIFE_REMAINING: XiaomiMiioSensorDescription( key=ATTR_DUST_FILTER_LIFE_REMAINING, - name="Dust filter life remaining", + name="Dust filter lifetime remaining", native_unit_of_measurement=PERCENTAGE, icon="mdi:air-filter", state_class=SensorStateClass.MEASUREMENT, @@ -329,7 +329,7 @@ class XiaomiMiioSensorDescription(SensorEntityDescription): ), ATTR_DUST_FILTER_LIFE_REMAINING_DAYS: XiaomiMiioSensorDescription( key=ATTR_DUST_FILTER_LIFE_REMAINING_DAYS, - name="Dust filter life remaining days", + name="Dust filter lifetime remaining days", native_unit_of_measurement=UnitOfTime.DAYS, icon="mdi:clock-outline", device_class=SensorDeviceClass.DURATION, @@ -338,7 +338,7 @@ class XiaomiMiioSensorDescription(SensorEntityDescription): ), ATTR_UPPER_FILTER_LIFE_REMAINING: XiaomiMiioSensorDescription( key=ATTR_UPPER_FILTER_LIFE_REMAINING, - name="Upper filter life remaining", + name="Upper filter lifetime remaining", native_unit_of_measurement=PERCENTAGE, icon="mdi:air-filter", state_class=SensorStateClass.MEASUREMENT, @@ -347,7 +347,7 @@ class XiaomiMiioSensorDescription(SensorEntityDescription): ), ATTR_UPPER_FILTER_LIFE_REMAINING_DAYS: XiaomiMiioSensorDescription( key=ATTR_UPPER_FILTER_LIFE_REMAINING_DAYS, - name="Upper filter life remaining days", + name="Upper filter lifetime remaining days", native_unit_of_measurement=UnitOfTime.DAYS, icon="mdi:clock-outline", device_class=SensorDeviceClass.DURATION,