Skip to content

Commit

Permalink
Rename 'life' to 'lifetime' in Xiaomi Miio (home-assistant#96817)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
c0ffeeca7 authored Jul 18, 2023
1 parent 5d096a6 commit aa13082
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions homeassistant/components/xiaomi_miio/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit aa13082

Please sign in to comment.