Rename 'life' to 'lifetime' in Brother (#96815)

This commit is contained in:
c0ffeeca7 2023-07-18 17:52:40 +02:00 committed by GitHub
parent 701c8a3768
commit da5455c454
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 26 deletions

View file

@ -44,7 +44,7 @@
"name": "Duplex unit page counter"
},
"drum_remaining_life": {
"name": "Drum remaining life"
"name": "Drum remaining lifetime"
},
"drum_remaining_pages": {
"name": "Drum remaining pages"
@ -53,7 +53,7 @@
"name": "Drum page counter"
},
"black_drum_remaining_life": {
"name": "Black drum remaining life"
"name": "Black drum remaining lifetime"
},
"black_drum_remaining_pages": {
"name": "Black drum remaining pages"
@ -62,7 +62,7 @@
"name": "Black drum page counter"
},
"cyan_drum_remaining_life": {
"name": "Cyan drum remaining life"
"name": "Cyan drum remaining lifetime"
},
"cyan_drum_remaining_pages": {
"name": "Cyan drum remaining pages"
@ -71,7 +71,7 @@
"name": "Cyan drum page counter"
},
"magenta_drum_remaining_life": {
"name": "Magenta drum remaining life"
"name": "Magenta drum remaining lifetime"
},
"magenta_drum_remaining_pages": {
"name": "Magenta drum remaining pages"
@ -80,7 +80,7 @@
"name": "Magenta drum page counter"
},
"yellow_drum_remaining_life": {
"name": "Yellow drum remaining life"
"name": "Yellow drum remaining lifetime"
},
"yellow_drum_remaining_pages": {
"name": "Yellow drum remaining pages"
@ -89,19 +89,19 @@
"name": "Yellow drum page counter"
},
"belt_unit_remaining_life": {
"name": "Belt unit remaining life"
"name": "Belt unit remaining lifetime"
},
"fuser_remaining_life": {
"name": "Fuser remaining life"
"name": "Fuser remaining lifetime"
},
"laser_remaining_life": {
"name": "Laser remaining life"
"name": "Laser remaining lifetime"
},
"pf_kit_1_remaining_life": {
"name": "PF Kit 1 remaining life"
"name": "PF Kit 1 remaining lifetime"
},
"pf_kit_mp_remaining_life": {
"name": "PF Kit MP remaining life"
"name": "PF Kit MP remaining lifetime"
},
"black_toner_remaining": {
"name": "Black toner remaining"

View file

@ -110,14 +110,14 @@ async def test_sensors(hass: HomeAssistant) -> None:
assert entry
assert entry.unique_id == "0123456789_yellow_toner_remaining"
state = hass.states.get("sensor.hl_l2340dw_drum_remaining_life")
state = hass.states.get("sensor.hl_l2340dw_drum_remaining_lifetime")
assert state
assert state.attributes.get(ATTR_ICON) == "mdi:chart-donut"
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == PERCENTAGE
assert state.state == "92"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
entry = registry.async_get("sensor.hl_l2340dw_drum_remaining_life")
entry = registry.async_get("sensor.hl_l2340dw_drum_remaining_lifetime")
assert entry
assert entry.unique_id == "0123456789_drum_remaining_life"
@ -143,14 +143,14 @@ async def test_sensors(hass: HomeAssistant) -> None:
assert entry
assert entry.unique_id == "0123456789_drum_counter"
state = hass.states.get("sensor.hl_l2340dw_black_drum_remaining_life")
state = hass.states.get("sensor.hl_l2340dw_black_drum_remaining_lifetime")
assert state
assert state.attributes.get(ATTR_ICON) == "mdi:chart-donut"
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == PERCENTAGE
assert state.state == "92"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
entry = registry.async_get("sensor.hl_l2340dw_black_drum_remaining_life")
entry = registry.async_get("sensor.hl_l2340dw_black_drum_remaining_lifetime")
assert entry
assert entry.unique_id == "0123456789_black_drum_remaining_life"
@ -176,14 +176,14 @@ async def test_sensors(hass: HomeAssistant) -> None:
assert entry
assert entry.unique_id == "0123456789_black_drum_counter"
state = hass.states.get("sensor.hl_l2340dw_cyan_drum_remaining_life")
state = hass.states.get("sensor.hl_l2340dw_cyan_drum_remaining_lifetime")
assert state
assert state.attributes.get(ATTR_ICON) == "mdi:chart-donut"
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == PERCENTAGE
assert state.state == "92"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
entry = registry.async_get("sensor.hl_l2340dw_cyan_drum_remaining_life")
entry = registry.async_get("sensor.hl_l2340dw_cyan_drum_remaining_lifetime")
assert entry
assert entry.unique_id == "0123456789_cyan_drum_remaining_life"
@ -209,14 +209,14 @@ async def test_sensors(hass: HomeAssistant) -> None:
assert entry
assert entry.unique_id == "0123456789_cyan_drum_counter"
state = hass.states.get("sensor.hl_l2340dw_magenta_drum_remaining_life")
state = hass.states.get("sensor.hl_l2340dw_magenta_drum_remaining_lifetime")
assert state
assert state.attributes.get(ATTR_ICON) == "mdi:chart-donut"
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == PERCENTAGE
assert state.state == "92"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
entry = registry.async_get("sensor.hl_l2340dw_magenta_drum_remaining_life")
entry = registry.async_get("sensor.hl_l2340dw_magenta_drum_remaining_lifetime")
assert entry
assert entry.unique_id == "0123456789_magenta_drum_remaining_life"
@ -242,14 +242,14 @@ async def test_sensors(hass: HomeAssistant) -> None:
assert entry
assert entry.unique_id == "0123456789_magenta_drum_counter"
state = hass.states.get("sensor.hl_l2340dw_yellow_drum_remaining_life")
state = hass.states.get("sensor.hl_l2340dw_yellow_drum_remaining_lifetime")
assert state
assert state.attributes.get(ATTR_ICON) == "mdi:chart-donut"
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == PERCENTAGE
assert state.state == "92"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
entry = registry.async_get("sensor.hl_l2340dw_yellow_drum_remaining_life")
entry = registry.async_get("sensor.hl_l2340dw_yellow_drum_remaining_lifetime")
assert entry
assert entry.unique_id == "0123456789_yellow_drum_remaining_life"
@ -275,36 +275,36 @@ async def test_sensors(hass: HomeAssistant) -> None:
assert entry
assert entry.unique_id == "0123456789_yellow_drum_counter"
state = hass.states.get("sensor.hl_l2340dw_fuser_remaining_life")
state = hass.states.get("sensor.hl_l2340dw_fuser_remaining_lifetime")
assert state
assert state.attributes.get(ATTR_ICON) == "mdi:water-outline"
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == PERCENTAGE
assert state.state == "97"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
entry = registry.async_get("sensor.hl_l2340dw_fuser_remaining_life")
entry = registry.async_get("sensor.hl_l2340dw_fuser_remaining_lifetime")
assert entry
assert entry.unique_id == "0123456789_fuser_remaining_life"
state = hass.states.get("sensor.hl_l2340dw_belt_unit_remaining_life")
state = hass.states.get("sensor.hl_l2340dw_belt_unit_remaining_lifetime")
assert state
assert state.attributes.get(ATTR_ICON) == "mdi:current-ac"
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == PERCENTAGE
assert state.state == "97"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
entry = registry.async_get("sensor.hl_l2340dw_belt_unit_remaining_life")
entry = registry.async_get("sensor.hl_l2340dw_belt_unit_remaining_lifetime")
assert entry
assert entry.unique_id == "0123456789_belt_unit_remaining_life"
state = hass.states.get("sensor.hl_l2340dw_pf_kit_1_remaining_life")
state = hass.states.get("sensor.hl_l2340dw_pf_kit_1_remaining_lifetime")
assert state
assert state.attributes.get(ATTR_ICON) == "mdi:printer-3d"
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == PERCENTAGE
assert state.state == "98"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
entry = registry.async_get("sensor.hl_l2340dw_pf_kit_1_remaining_life")
entry = registry.async_get("sensor.hl_l2340dw_pf_kit_1_remaining_lifetime")
assert entry
assert entry.unique_id == "0123456789_pf_kit_1_remaining_life"