Add icon translations to Brother (#110128)

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
pull/110179/head
Maciej Bieniek 2024-02-10 12:17:53 +01:00 committed by GitHub
parent a2f4e99994
commit 845071f8f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 132 additions and 60 deletions

View File

@ -0,0 +1,105 @@
{
"entity": {
"sensor": {
"belt_unit_remaining_life": {
"default": "mdi:current-ac"
},
"black_drum_page_counter": {
"default": "mdi:chart-donut"
},
"black_drum_remaining_life": {
"default": "mdi:chart-donut"
},
"black_drum_remaining_pages": {
"default": "mdi:chart-donut"
},
"black_toner_remaining": {
"default": "mdi:printer-3d-nozzle"
},
"black_ink_remaining": {
"default": "mdi:printer-3d-nozzle"
},
"bw_pages": {
"default": "mdi:file-document-outline"
},
"color_pages": {
"default": "mdi:file-document-outline"
},
"cyan_drum_page_counter": {
"default": "mdi:chart-donut"
},
"cyan_drum_remaining_life": {
"default": "mdi:chart-donut"
},
"cyan_drum_remaining_pages": {
"default": "mdi:chart-donut"
},
"cyan_ink_remaining": {
"default": "mdi:printer-3d-nozzle"
},
"cyan_toner_remaining": {
"default": "mdi:printer-3d-nozzle"
},
"drum_page_counter": {
"default": "mdi:chart-donut"
},
"drum_remaining_life": {
"default": "mdi:chart-donut"
},
"drum_remaining_pages": {
"default": "mdi:chart-donut"
},
"duplex_unit_page_counter": {
"default": "mdi:file-document-outline"
},
"fuser_remaining_life": {
"default": "mdi:water-outline"
},
"laser_remaining_life": {
"default": "mdi:spotlight-beam"
},
"magenta_drum_page_counter": {
"default": "mdi:chart-donut"
},
"magenta_drum_remaining_life": {
"default": "mdi:chart-donut"
},
"magenta_drum_remaining_pages": {
"default": "mdi:chart-donut"
},
"magenta_ink_remaining": {
"default": "mdi:printer-3d-nozzle"
},
"magenta_toner_remaining": {
"default": "mdi:printer-3d-nozzle"
},
"status": {
"default": "mdi:printer"
},
"page_counter": {
"default": "mdi:file-document-outline"
},
"pf_kit_1_remaining_life": {
"default": "mdi:printer-3d"
},
"pf_kit_mp_remaining_life": {
"default": "mdi:printer-3d"
},
"yellow_drum_page_counter": {
"default": "mdi:chart-donut"
},
"yellow_drum_remaining_life": {
"default": "mdi:chart-donut"
},
"yellow_drum_remaining_pages": {
"default": "mdi:chart-donut"
},
"yellow_ink_remaining": {
"default": "mdi:printer-3d-nozzle"
},
"yellow_toner_remaining": {
"default": "mdi:printer-3d-nozzle"
}
}
}
}

View File

@ -52,14 +52,12 @@ class BrotherSensorEntityDescription(
SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = (
BrotherSensorEntityDescription(
key="status",
icon="mdi:printer",
translation_key="status",
entity_category=EntityCategory.DIAGNOSTIC,
value=lambda data: data.status,
),
BrotherSensorEntityDescription(
key="page_counter",
icon="mdi:file-document-outline",
translation_key="page_counter",
native_unit_of_measurement=UNIT_PAGES,
state_class=SensorStateClass.MEASUREMENT,
@ -68,7 +66,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = (
),
BrotherSensorEntityDescription(
key="bw_counter",
icon="mdi:file-document-outline",
translation_key="bw_pages",
native_unit_of_measurement=UNIT_PAGES,
state_class=SensorStateClass.MEASUREMENT,
@ -77,7 +74,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = (
),
BrotherSensorEntityDescription(
key="color_counter",
icon="mdi:file-document-outline",
translation_key="color_pages",
native_unit_of_measurement=UNIT_PAGES,
state_class=SensorStateClass.MEASUREMENT,
@ -86,7 +82,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = (
),
BrotherSensorEntityDescription(
key="duplex_unit_pages_counter",
icon="mdi:file-document-outline",
translation_key="duplex_unit_page_counter",
native_unit_of_measurement=UNIT_PAGES,
state_class=SensorStateClass.MEASUREMENT,
@ -95,7 +90,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = (
),
BrotherSensorEntityDescription(
key="drum_remaining_life",
icon="mdi:chart-donut",
translation_key="drum_remaining_life",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
@ -104,7 +98,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = (
),
BrotherSensorEntityDescription(
key="drum_remaining_pages",
icon="mdi:chart-donut",
translation_key="drum_remaining_pages",
native_unit_of_measurement=UNIT_PAGES,
state_class=SensorStateClass.MEASUREMENT,
@ -113,7 +106,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = (
),
BrotherSensorEntityDescription(
key="drum_counter",
icon="mdi:chart-donut",
translation_key="drum_page_counter",
native_unit_of_measurement=UNIT_PAGES,
state_class=SensorStateClass.MEASUREMENT,
@ -122,7 +114,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = (
),
BrotherSensorEntityDescription(
key="black_drum_remaining_life",
icon="mdi:chart-donut",
translation_key="black_drum_remaining_life",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
@ -131,7 +122,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = (
),
BrotherSensorEntityDescription(
key="black_drum_remaining_pages",
icon="mdi:chart-donut",
translation_key="black_drum_remaining_pages",
native_unit_of_measurement=UNIT_PAGES,
state_class=SensorStateClass.MEASUREMENT,
@ -140,7 +130,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = (
),
BrotherSensorEntityDescription(
key="black_drum_counter",
icon="mdi:chart-donut",
translation_key="black_drum_page_counter",
native_unit_of_measurement=UNIT_PAGES,
state_class=SensorStateClass.MEASUREMENT,
@ -149,7 +138,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = (
),
BrotherSensorEntityDescription(
key="cyan_drum_remaining_life",
icon="mdi:chart-donut",
translation_key="cyan_drum_remaining_life",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
@ -158,7 +146,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = (
),
BrotherSensorEntityDescription(
key="cyan_drum_remaining_pages",
icon="mdi:chart-donut",
translation_key="cyan_drum_remaining_pages",
native_unit_of_measurement=UNIT_PAGES,
state_class=SensorStateClass.MEASUREMENT,
@ -167,7 +154,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = (
),
BrotherSensorEntityDescription(
key="cyan_drum_counter",
icon="mdi:chart-donut",
translation_key="cyan_drum_page_counter",
native_unit_of_measurement=UNIT_PAGES,
state_class=SensorStateClass.MEASUREMENT,
@ -176,7 +162,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = (
),
BrotherSensorEntityDescription(
key="magenta_drum_remaining_life",
icon="mdi:chart-donut",
translation_key="magenta_drum_remaining_life",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
@ -185,7 +170,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = (
),
BrotherSensorEntityDescription(
key="magenta_drum_remaining_pages",
icon="mdi:chart-donut",
translation_key="magenta_drum_remaining_pages",
native_unit_of_measurement=UNIT_PAGES,
state_class=SensorStateClass.MEASUREMENT,
@ -194,7 +178,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = (
),
BrotherSensorEntityDescription(
key="magenta_drum_counter",
icon="mdi:chart-donut",
translation_key="magenta_drum_page_counter",
native_unit_of_measurement=UNIT_PAGES,
state_class=SensorStateClass.MEASUREMENT,
@ -203,7 +186,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = (
),
BrotherSensorEntityDescription(
key="yellow_drum_remaining_life",
icon="mdi:chart-donut",
translation_key="yellow_drum_remaining_life",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
@ -212,7 +194,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = (
),
BrotherSensorEntityDescription(
key="yellow_drum_remaining_pages",
icon="mdi:chart-donut",
translation_key="yellow_drum_remaining_pages",
native_unit_of_measurement=UNIT_PAGES,
state_class=SensorStateClass.MEASUREMENT,
@ -221,7 +202,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = (
),
BrotherSensorEntityDescription(
key="yellow_drum_counter",
icon="mdi:chart-donut",
translation_key="yellow_drum_page_counter",
native_unit_of_measurement=UNIT_PAGES,
state_class=SensorStateClass.MEASUREMENT,
@ -230,7 +210,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = (
),
BrotherSensorEntityDescription(
key="belt_unit_remaining_life",
icon="mdi:current-ac",
translation_key="belt_unit_remaining_life",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
@ -239,7 +218,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = (
),
BrotherSensorEntityDescription(
key="fuser_remaining_life",
icon="mdi:water-outline",
translation_key="fuser_remaining_life",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
@ -248,7 +226,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = (
),
BrotherSensorEntityDescription(
key="laser_remaining_life",
icon="mdi:spotlight-beam",
translation_key="laser_remaining_life",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
@ -257,7 +234,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = (
),
BrotherSensorEntityDescription(
key="pf_kit_1_remaining_life",
icon="mdi:printer-3d",
translation_key="pf_kit_1_remaining_life",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
@ -266,7 +242,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = (
),
BrotherSensorEntityDescription(
key="pf_kit_mp_remaining_life",
icon="mdi:printer-3d",
translation_key="pf_kit_mp_remaining_life",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
@ -275,7 +250,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = (
),
BrotherSensorEntityDescription(
key="black_toner_remaining",
icon="mdi:printer-3d-nozzle",
translation_key="black_toner_remaining",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
@ -284,7 +258,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = (
),
BrotherSensorEntityDescription(
key="cyan_toner_remaining",
icon="mdi:printer-3d-nozzle",
translation_key="cyan_toner_remaining",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
@ -293,7 +266,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = (
),
BrotherSensorEntityDescription(
key="magenta_toner_remaining",
icon="mdi:printer-3d-nozzle",
translation_key="magenta_toner_remaining",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
@ -302,7 +274,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = (
),
BrotherSensorEntityDescription(
key="yellow_toner_remaining",
icon="mdi:printer-3d-nozzle",
translation_key="yellow_toner_remaining",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
@ -311,7 +282,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = (
),
BrotherSensorEntityDescription(
key="black_ink_remaining",
icon="mdi:printer-3d-nozzle",
translation_key="black_ink_remaining",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
@ -320,7 +290,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = (
),
BrotherSensorEntityDescription(
key="cyan_ink_remaining",
icon="mdi:printer-3d-nozzle",
translation_key="cyan_ink_remaining",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
@ -329,7 +298,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = (
),
BrotherSensorEntityDescription(
key="magenta_ink_remaining",
icon="mdi:printer-3d-nozzle",
translation_key="magenta_ink_remaining",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
@ -338,7 +306,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = (
),
BrotherSensorEntityDescription(
key="yellow_ink_remaining",
icon="mdi:printer-3d-nozzle",
translation_key="yellow_ink_remaining",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,

View File

@ -56,7 +56,7 @@ async def test_sensors(hass: HomeAssistant, entity_registry: er.EntityRegistry)
state = hass.states.get("sensor.hl_l2340dw_status")
assert state
assert state.attributes.get(ATTR_ICON) == "mdi:printer"
assert state.attributes.get(ATTR_ICON) is None
assert state.state == "waiting"
assert state.attributes.get(ATTR_STATE_CLASS) is None
@ -66,7 +66,7 @@ async def test_sensors(hass: HomeAssistant, entity_registry: er.EntityRegistry)
state = hass.states.get("sensor.hl_l2340dw_black_toner_remaining")
assert state
assert state.attributes.get(ATTR_ICON) == "mdi:printer-3d-nozzle"
assert state.attributes.get(ATTR_ICON) is None
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == PERCENTAGE
assert state.state == "75"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
@ -77,7 +77,7 @@ async def test_sensors(hass: HomeAssistant, entity_registry: er.EntityRegistry)
state = hass.states.get("sensor.hl_l2340dw_cyan_toner_remaining")
assert state
assert state.attributes.get(ATTR_ICON) == "mdi:printer-3d-nozzle"
assert state.attributes.get(ATTR_ICON) is None
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == PERCENTAGE
assert state.state == "10"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
@ -88,7 +88,7 @@ async def test_sensors(hass: HomeAssistant, entity_registry: er.EntityRegistry)
state = hass.states.get("sensor.hl_l2340dw_magenta_toner_remaining")
assert state
assert state.attributes.get(ATTR_ICON) == "mdi:printer-3d-nozzle"
assert state.attributes.get(ATTR_ICON) is None
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == PERCENTAGE
assert state.state == "8"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
@ -99,7 +99,7 @@ async def test_sensors(hass: HomeAssistant, entity_registry: er.EntityRegistry)
state = hass.states.get("sensor.hl_l2340dw_yellow_toner_remaining")
assert state
assert state.attributes.get(ATTR_ICON) == "mdi:printer-3d-nozzle"
assert state.attributes.get(ATTR_ICON) is None
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == PERCENTAGE
assert state.state == "2"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
@ -110,7 +110,7 @@ async def test_sensors(hass: HomeAssistant, entity_registry: er.EntityRegistry)
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_ICON) is None
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == PERCENTAGE
assert state.state == "92"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
@ -121,7 +121,7 @@ async def test_sensors(hass: HomeAssistant, entity_registry: er.EntityRegistry)
state = hass.states.get("sensor.hl_l2340dw_drum_remaining_pages")
assert state
assert state.attributes.get(ATTR_ICON) == "mdi:chart-donut"
assert state.attributes.get(ATTR_ICON) is None
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == UNIT_PAGES
assert state.state == "11014"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
@ -132,7 +132,7 @@ async def test_sensors(hass: HomeAssistant, entity_registry: er.EntityRegistry)
state = hass.states.get("sensor.hl_l2340dw_drum_page_counter")
assert state
assert state.attributes.get(ATTR_ICON) == "mdi:chart-donut"
assert state.attributes.get(ATTR_ICON) is None
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == UNIT_PAGES
assert state.state == "986"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
@ -143,7 +143,7 @@ async def test_sensors(hass: HomeAssistant, entity_registry: er.EntityRegistry)
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_ICON) is None
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == PERCENTAGE
assert state.state == "92"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
@ -154,7 +154,7 @@ async def test_sensors(hass: HomeAssistant, entity_registry: er.EntityRegistry)
state = hass.states.get("sensor.hl_l2340dw_black_drum_remaining_pages")
assert state
assert state.attributes.get(ATTR_ICON) == "mdi:chart-donut"
assert state.attributes.get(ATTR_ICON) is None
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == UNIT_PAGES
assert state.state == "16389"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
@ -165,7 +165,7 @@ async def test_sensors(hass: HomeAssistant, entity_registry: er.EntityRegistry)
state = hass.states.get("sensor.hl_l2340dw_black_drum_page_counter")
assert state
assert state.attributes.get(ATTR_ICON) == "mdi:chart-donut"
assert state.attributes.get(ATTR_ICON) is None
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == UNIT_PAGES
assert state.state == "1611"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
@ -176,7 +176,7 @@ async def test_sensors(hass: HomeAssistant, entity_registry: er.EntityRegistry)
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_ICON) is None
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == PERCENTAGE
assert state.state == "92"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
@ -187,7 +187,7 @@ async def test_sensors(hass: HomeAssistant, entity_registry: er.EntityRegistry)
state = hass.states.get("sensor.hl_l2340dw_cyan_drum_remaining_pages")
assert state
assert state.attributes.get(ATTR_ICON) == "mdi:chart-donut"
assert state.attributes.get(ATTR_ICON) is None
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == UNIT_PAGES
assert state.state == "16389"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
@ -198,7 +198,7 @@ async def test_sensors(hass: HomeAssistant, entity_registry: er.EntityRegistry)
state = hass.states.get("sensor.hl_l2340dw_cyan_drum_page_counter")
assert state
assert state.attributes.get(ATTR_ICON) == "mdi:chart-donut"
assert state.attributes.get(ATTR_ICON) is None
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == UNIT_PAGES
assert state.state == "1611"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
@ -209,7 +209,7 @@ async def test_sensors(hass: HomeAssistant, entity_registry: er.EntityRegistry)
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_ICON) is None
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == PERCENTAGE
assert state.state == "92"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
@ -222,7 +222,7 @@ async def test_sensors(hass: HomeAssistant, entity_registry: er.EntityRegistry)
state = hass.states.get("sensor.hl_l2340dw_magenta_drum_remaining_pages")
assert state
assert state.attributes.get(ATTR_ICON) == "mdi:chart-donut"
assert state.attributes.get(ATTR_ICON) is None
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == UNIT_PAGES
assert state.state == "16389"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
@ -233,7 +233,7 @@ async def test_sensors(hass: HomeAssistant, entity_registry: er.EntityRegistry)
state = hass.states.get("sensor.hl_l2340dw_magenta_drum_page_counter")
assert state
assert state.attributes.get(ATTR_ICON) == "mdi:chart-donut"
assert state.attributes.get(ATTR_ICON) is None
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == UNIT_PAGES
assert state.state == "1611"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
@ -244,7 +244,7 @@ async def test_sensors(hass: HomeAssistant, entity_registry: er.EntityRegistry)
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_ICON) is None
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == PERCENTAGE
assert state.state == "92"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
@ -257,7 +257,7 @@ async def test_sensors(hass: HomeAssistant, entity_registry: er.EntityRegistry)
state = hass.states.get("sensor.hl_l2340dw_yellow_drum_remaining_pages")
assert state
assert state.attributes.get(ATTR_ICON) == "mdi:chart-donut"
assert state.attributes.get(ATTR_ICON) is None
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == UNIT_PAGES
assert state.state == "16389"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
@ -268,7 +268,7 @@ async def test_sensors(hass: HomeAssistant, entity_registry: er.EntityRegistry)
state = hass.states.get("sensor.hl_l2340dw_yellow_drum_page_counter")
assert state
assert state.attributes.get(ATTR_ICON) == "mdi:chart-donut"
assert state.attributes.get(ATTR_ICON) is None
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == UNIT_PAGES
assert state.state == "1611"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
@ -279,7 +279,7 @@ async def test_sensors(hass: HomeAssistant, entity_registry: er.EntityRegistry)
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_ICON) is None
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == PERCENTAGE
assert state.state == "97"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
@ -290,7 +290,7 @@ async def test_sensors(hass: HomeAssistant, entity_registry: er.EntityRegistry)
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_ICON) is None
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == PERCENTAGE
assert state.state == "97"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
@ -301,7 +301,7 @@ async def test_sensors(hass: HomeAssistant, entity_registry: er.EntityRegistry)
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_ICON) is None
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == PERCENTAGE
assert state.state == "98"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
@ -312,7 +312,7 @@ async def test_sensors(hass: HomeAssistant, entity_registry: er.EntityRegistry)
state = hass.states.get("sensor.hl_l2340dw_page_counter")
assert state
assert state.attributes.get(ATTR_ICON) == "mdi:file-document-outline"
assert state.attributes.get(ATTR_ICON) is None
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == UNIT_PAGES
assert state.state == "986"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
@ -323,7 +323,7 @@ async def test_sensors(hass: HomeAssistant, entity_registry: er.EntityRegistry)
state = hass.states.get("sensor.hl_l2340dw_duplex_unit_page_counter")
assert state
assert state.attributes.get(ATTR_ICON) == "mdi:file-document-outline"
assert state.attributes.get(ATTR_ICON) is None
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == UNIT_PAGES
assert state.state == "538"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
@ -334,7 +334,7 @@ async def test_sensors(hass: HomeAssistant, entity_registry: er.EntityRegistry)
state = hass.states.get("sensor.hl_l2340dw_b_w_pages")
assert state
assert state.attributes.get(ATTR_ICON) == "mdi:file-document-outline"
assert state.attributes.get(ATTR_ICON) is None
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == UNIT_PAGES
assert state.state == "709"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT
@ -345,7 +345,7 @@ async def test_sensors(hass: HomeAssistant, entity_registry: er.EntityRegistry)
state = hass.states.get("sensor.hl_l2340dw_color_pages")
assert state
assert state.attributes.get(ATTR_ICON) == "mdi:file-document-outline"
assert state.attributes.get(ATTR_ICON) is None
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == UNIT_PAGES
assert state.state == "902"
assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT