Skip to content

Commit

Permalink
Add icon translations to Brother (#110128)
Browse files Browse the repository at this point in the history
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
  • Loading branch information
bieniu and bieniu committed Feb 10, 2024
1 parent a2f4e99 commit 845071f
Show file tree
Hide file tree
Showing 3 changed files with 132 additions and 60 deletions.
105 changes: 105 additions & 0 deletions homeassistant/components/brother/icons.json
@@ -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"
}
}
}
}
33 changes: 0 additions & 33 deletions homeassistant/components/brother/sensor.py
Expand Up @@ -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,
Expand All @@ -68,7 +66,6 @@ class BrotherSensorEntityDescription(
),
BrotherSensorEntityDescription(
key="bw_counter",
icon="mdi:file-document-outline",
translation_key="bw_pages",
native_unit_of_measurement=UNIT_PAGES,
state_class=SensorStateClass.MEASUREMENT,
Expand All @@ -77,7 +74,6 @@ class BrotherSensorEntityDescription(
),
BrotherSensorEntityDescription(
key="color_counter",
icon="mdi:file-document-outline",
translation_key="color_pages",
native_unit_of_measurement=UNIT_PAGES,
state_class=SensorStateClass.MEASUREMENT,
Expand All @@ -86,7 +82,6 @@ class 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,
Expand All @@ -95,7 +90,6 @@ class BrotherSensorEntityDescription(
),
BrotherSensorEntityDescription(
key="drum_remaining_life",
icon="mdi:chart-donut",
translation_key="drum_remaining_life",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
Expand All @@ -104,7 +98,6 @@ class 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,
Expand All @@ -113,7 +106,6 @@ class BrotherSensorEntityDescription(
),
BrotherSensorEntityDescription(
key="drum_counter",
icon="mdi:chart-donut",
translation_key="drum_page_counter",
native_unit_of_measurement=UNIT_PAGES,
state_class=SensorStateClass.MEASUREMENT,
Expand All @@ -122,7 +114,6 @@ class 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,
Expand All @@ -131,7 +122,6 @@ class 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,
Expand All @@ -140,7 +130,6 @@ class 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,
Expand All @@ -149,7 +138,6 @@ class 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,
Expand All @@ -158,7 +146,6 @@ class 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,
Expand All @@ -167,7 +154,6 @@ class 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,
Expand All @@ -176,7 +162,6 @@ class 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,
Expand All @@ -185,7 +170,6 @@ class 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,
Expand All @@ -194,7 +178,6 @@ class 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,
Expand All @@ -203,7 +186,6 @@ class 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,
Expand All @@ -212,7 +194,6 @@ class 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,
Expand All @@ -221,7 +202,6 @@ class 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,
Expand All @@ -230,7 +210,6 @@ class 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,
Expand All @@ -239,7 +218,6 @@ class BrotherSensorEntityDescription(
),
BrotherSensorEntityDescription(
key="fuser_remaining_life",
icon="mdi:water-outline",
translation_key="fuser_remaining_life",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
Expand All @@ -248,7 +226,6 @@ class BrotherSensorEntityDescription(
),
BrotherSensorEntityDescription(
key="laser_remaining_life",
icon="mdi:spotlight-beam",
translation_key="laser_remaining_life",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
Expand All @@ -257,7 +234,6 @@ class 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,
Expand All @@ -266,7 +242,6 @@ class 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,
Expand All @@ -275,7 +250,6 @@ class 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,
Expand All @@ -284,7 +258,6 @@ class 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,
Expand All @@ -293,7 +266,6 @@ class 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,
Expand All @@ -302,7 +274,6 @@ class 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,
Expand All @@ -311,7 +282,6 @@ class 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,
Expand All @@ -320,7 +290,6 @@ class 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,
Expand All @@ -329,7 +298,6 @@ class 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,
Expand All @@ -338,7 +306,6 @@ class 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,
Expand Down

0 comments on commit 845071f

Please sign in to comment.