2020-01-06 17:06:16 +00:00
|
|
|
"""Constants for Brother integration."""
|
2021-02-23 08:56:44 +00:00
|
|
|
from homeassistant.const import ATTR_ICON, PERCENTAGE
|
2020-02-23 20:09:24 +00:00
|
|
|
|
2020-01-06 17:06:16 +00:00
|
|
|
ATTR_BELT_UNIT_REMAINING_LIFE = "belt_unit_remaining_life"
|
2020-03-09 18:54:43 +00:00
|
|
|
ATTR_BLACK_DRUM_COUNTER = "black_drum_counter"
|
|
|
|
ATTR_BLACK_DRUM_REMAINING_LIFE = "black_drum_remaining_life"
|
|
|
|
ATTR_BLACK_DRUM_REMAINING_PAGES = "black_drum_remaining_pages"
|
2020-01-06 17:06:16 +00:00
|
|
|
ATTR_BLACK_INK_REMAINING = "black_ink_remaining"
|
|
|
|
ATTR_BLACK_TONER_REMAINING = "black_toner_remaining"
|
|
|
|
ATTR_BW_COUNTER = "b/w_counter"
|
|
|
|
ATTR_COLOR_COUNTER = "color_counter"
|
2020-03-09 18:54:43 +00:00
|
|
|
ATTR_CYAN_DRUM_COUNTER = "cyan_drum_counter"
|
|
|
|
ATTR_CYAN_DRUM_REMAINING_LIFE = "cyan_drum_remaining_life"
|
|
|
|
ATTR_CYAN_DRUM_REMAINING_PAGES = "cyan_drum_remaining_pages"
|
2020-01-06 17:06:16 +00:00
|
|
|
ATTR_CYAN_INK_REMAINING = "cyan_ink_remaining"
|
|
|
|
ATTR_CYAN_TONER_REMAINING = "cyan_toner_remaining"
|
|
|
|
ATTR_DRUM_COUNTER = "drum_counter"
|
|
|
|
ATTR_DRUM_REMAINING_LIFE = "drum_remaining_life"
|
|
|
|
ATTR_DRUM_REMAINING_PAGES = "drum_remaining_pages"
|
2020-03-09 18:54:43 +00:00
|
|
|
ATTR_DUPLEX_COUNTER = "duplex_unit_pages_counter"
|
2020-11-22 21:42:16 +00:00
|
|
|
ATTR_ENABLED = "enabled"
|
2020-01-06 17:06:16 +00:00
|
|
|
ATTR_FUSER_REMAINING_LIFE = "fuser_remaining_life"
|
|
|
|
ATTR_LABEL = "label"
|
|
|
|
ATTR_LASER_REMAINING_LIFE = "laser_remaining_life"
|
2020-03-09 18:54:43 +00:00
|
|
|
ATTR_MAGENTA_DRUM_COUNTER = "magenta_drum_counter"
|
|
|
|
ATTR_MAGENTA_DRUM_REMAINING_LIFE = "magenta_drum_remaining_life"
|
|
|
|
ATTR_MAGENTA_DRUM_REMAINING_PAGES = "magenta_drum_remaining_pages"
|
2020-01-06 17:06:16 +00:00
|
|
|
ATTR_MAGENTA_INK_REMAINING = "magenta_ink_remaining"
|
|
|
|
ATTR_MAGENTA_TONER_REMAINING = "magenta_toner_remaining"
|
|
|
|
ATTR_MANUFACTURER = "Brother"
|
|
|
|
ATTR_PAGE_COUNTER = "page_counter"
|
|
|
|
ATTR_PF_KIT_1_REMAINING_LIFE = "pf_kit_1_remaining_life"
|
|
|
|
ATTR_PF_KIT_MP_REMAINING_LIFE = "pf_kit_mp_remaining_life"
|
|
|
|
ATTR_STATUS = "status"
|
|
|
|
ATTR_UNIT = "unit"
|
|
|
|
ATTR_UPTIME = "uptime"
|
2020-03-09 18:54:43 +00:00
|
|
|
ATTR_YELLOW_DRUM_COUNTER = "yellow_drum_counter"
|
|
|
|
ATTR_YELLOW_DRUM_REMAINING_LIFE = "yellow_drum_remaining_life"
|
|
|
|
ATTR_YELLOW_DRUM_REMAINING_PAGES = "yellow_drum_remaining_pages"
|
2020-01-06 17:06:16 +00:00
|
|
|
ATTR_YELLOW_INK_REMAINING = "yellow_ink_remaining"
|
|
|
|
ATTR_YELLOW_TONER_REMAINING = "yellow_toner_remaining"
|
|
|
|
|
2021-02-12 17:11:35 +00:00
|
|
|
DATA_CONFIG_ENTRY = "config_entry"
|
|
|
|
|
2020-01-06 17:06:16 +00:00
|
|
|
DOMAIN = "brother"
|
|
|
|
|
|
|
|
UNIT_PAGES = "p"
|
|
|
|
|
|
|
|
PRINTER_TYPES = ["laser", "ink"]
|
|
|
|
|
2021-02-12 17:11:35 +00:00
|
|
|
SNMP = "snmp"
|
|
|
|
|
2021-04-22 11:20:14 +00:00
|
|
|
ATTRS_MAP = {
|
|
|
|
ATTR_DRUM_REMAINING_LIFE: (ATTR_DRUM_REMAINING_PAGES, ATTR_DRUM_COUNTER),
|
|
|
|
ATTR_BLACK_DRUM_REMAINING_LIFE: (
|
|
|
|
ATTR_BLACK_DRUM_REMAINING_PAGES,
|
|
|
|
ATTR_BLACK_DRUM_COUNTER,
|
|
|
|
),
|
|
|
|
ATTR_CYAN_DRUM_REMAINING_LIFE: (
|
|
|
|
ATTR_CYAN_DRUM_REMAINING_PAGES,
|
|
|
|
ATTR_CYAN_DRUM_COUNTER,
|
|
|
|
),
|
|
|
|
ATTR_MAGENTA_DRUM_REMAINING_LIFE: (
|
|
|
|
ATTR_MAGENTA_DRUM_REMAINING_PAGES,
|
|
|
|
ATTR_MAGENTA_DRUM_COUNTER,
|
|
|
|
),
|
|
|
|
ATTR_YELLOW_DRUM_REMAINING_LIFE: (
|
|
|
|
ATTR_YELLOW_DRUM_REMAINING_PAGES,
|
|
|
|
ATTR_YELLOW_DRUM_COUNTER,
|
|
|
|
),
|
|
|
|
}
|
|
|
|
|
2020-01-06 17:06:16 +00:00
|
|
|
SENSOR_TYPES = {
|
|
|
|
ATTR_STATUS: {
|
2020-03-20 09:21:43 +00:00
|
|
|
ATTR_ICON: "mdi:printer",
|
2020-01-06 17:06:16 +00:00
|
|
|
ATTR_LABEL: ATTR_STATUS.title(),
|
|
|
|
ATTR_UNIT: None,
|
2020-11-22 21:42:16 +00:00
|
|
|
ATTR_ENABLED: True,
|
2020-01-06 17:06:16 +00:00
|
|
|
},
|
|
|
|
ATTR_PAGE_COUNTER: {
|
|
|
|
ATTR_ICON: "mdi:file-document-outline",
|
|
|
|
ATTR_LABEL: ATTR_PAGE_COUNTER.replace("_", " ").title(),
|
|
|
|
ATTR_UNIT: UNIT_PAGES,
|
2020-11-22 21:42:16 +00:00
|
|
|
ATTR_ENABLED: True,
|
2020-01-06 17:06:16 +00:00
|
|
|
},
|
|
|
|
ATTR_BW_COUNTER: {
|
|
|
|
ATTR_ICON: "mdi:file-document-outline",
|
|
|
|
ATTR_LABEL: ATTR_BW_COUNTER.replace("_", " ").title(),
|
|
|
|
ATTR_UNIT: UNIT_PAGES,
|
2020-11-22 21:42:16 +00:00
|
|
|
ATTR_ENABLED: True,
|
2020-01-06 17:06:16 +00:00
|
|
|
},
|
|
|
|
ATTR_COLOR_COUNTER: {
|
|
|
|
ATTR_ICON: "mdi:file-document-outline",
|
|
|
|
ATTR_LABEL: ATTR_COLOR_COUNTER.replace("_", " ").title(),
|
|
|
|
ATTR_UNIT: UNIT_PAGES,
|
2020-11-22 21:42:16 +00:00
|
|
|
ATTR_ENABLED: True,
|
2020-01-06 17:06:16 +00:00
|
|
|
},
|
2020-03-09 18:54:43 +00:00
|
|
|
ATTR_DUPLEX_COUNTER: {
|
|
|
|
ATTR_ICON: "mdi:file-document-outline",
|
|
|
|
ATTR_LABEL: ATTR_DUPLEX_COUNTER.replace("_", " ").title(),
|
|
|
|
ATTR_UNIT: UNIT_PAGES,
|
2020-11-22 21:42:16 +00:00
|
|
|
ATTR_ENABLED: True,
|
2020-03-09 18:54:43 +00:00
|
|
|
},
|
2020-01-06 17:06:16 +00:00
|
|
|
ATTR_DRUM_REMAINING_LIFE: {
|
|
|
|
ATTR_ICON: "mdi:chart-donut",
|
|
|
|
ATTR_LABEL: ATTR_DRUM_REMAINING_LIFE.replace("_", " ").title(),
|
2020-09-05 19:09:14 +00:00
|
|
|
ATTR_UNIT: PERCENTAGE,
|
2020-11-22 21:42:16 +00:00
|
|
|
ATTR_ENABLED: True,
|
2020-01-06 17:06:16 +00:00
|
|
|
},
|
2020-03-09 18:54:43 +00:00
|
|
|
ATTR_BLACK_DRUM_REMAINING_LIFE: {
|
|
|
|
ATTR_ICON: "mdi:chart-donut",
|
|
|
|
ATTR_LABEL: ATTR_BLACK_DRUM_REMAINING_LIFE.replace("_", " ").title(),
|
2020-09-05 19:09:14 +00:00
|
|
|
ATTR_UNIT: PERCENTAGE,
|
2020-11-22 21:42:16 +00:00
|
|
|
ATTR_ENABLED: True,
|
2020-03-09 18:54:43 +00:00
|
|
|
},
|
|
|
|
ATTR_CYAN_DRUM_REMAINING_LIFE: {
|
|
|
|
ATTR_ICON: "mdi:chart-donut",
|
|
|
|
ATTR_LABEL: ATTR_CYAN_DRUM_REMAINING_LIFE.replace("_", " ").title(),
|
2020-09-05 19:09:14 +00:00
|
|
|
ATTR_UNIT: PERCENTAGE,
|
2020-11-22 21:42:16 +00:00
|
|
|
ATTR_ENABLED: True,
|
2020-03-09 18:54:43 +00:00
|
|
|
},
|
|
|
|
ATTR_MAGENTA_DRUM_REMAINING_LIFE: {
|
|
|
|
ATTR_ICON: "mdi:chart-donut",
|
|
|
|
ATTR_LABEL: ATTR_MAGENTA_DRUM_REMAINING_LIFE.replace("_", " ").title(),
|
2020-09-05 19:09:14 +00:00
|
|
|
ATTR_UNIT: PERCENTAGE,
|
2020-11-22 21:42:16 +00:00
|
|
|
ATTR_ENABLED: True,
|
2020-03-09 18:54:43 +00:00
|
|
|
},
|
|
|
|
ATTR_YELLOW_DRUM_REMAINING_LIFE: {
|
|
|
|
ATTR_ICON: "mdi:chart-donut",
|
|
|
|
ATTR_LABEL: ATTR_YELLOW_DRUM_REMAINING_LIFE.replace("_", " ").title(),
|
2020-09-05 19:09:14 +00:00
|
|
|
ATTR_UNIT: PERCENTAGE,
|
2020-11-22 21:42:16 +00:00
|
|
|
ATTR_ENABLED: True,
|
2020-03-09 18:54:43 +00:00
|
|
|
},
|
2020-01-06 17:06:16 +00:00
|
|
|
ATTR_BELT_UNIT_REMAINING_LIFE: {
|
|
|
|
ATTR_ICON: "mdi:current-ac",
|
|
|
|
ATTR_LABEL: ATTR_BELT_UNIT_REMAINING_LIFE.replace("_", " ").title(),
|
2020-09-05 19:09:14 +00:00
|
|
|
ATTR_UNIT: PERCENTAGE,
|
2020-11-22 21:42:16 +00:00
|
|
|
ATTR_ENABLED: True,
|
2020-01-06 17:06:16 +00:00
|
|
|
},
|
|
|
|
ATTR_FUSER_REMAINING_LIFE: {
|
|
|
|
ATTR_ICON: "mdi:water-outline",
|
|
|
|
ATTR_LABEL: ATTR_FUSER_REMAINING_LIFE.replace("_", " ").title(),
|
2020-09-05 19:09:14 +00:00
|
|
|
ATTR_UNIT: PERCENTAGE,
|
2020-11-22 21:42:16 +00:00
|
|
|
ATTR_ENABLED: True,
|
2020-01-06 17:06:16 +00:00
|
|
|
},
|
|
|
|
ATTR_LASER_REMAINING_LIFE: {
|
|
|
|
ATTR_ICON: "mdi:spotlight-beam",
|
|
|
|
ATTR_LABEL: ATTR_LASER_REMAINING_LIFE.replace("_", " ").title(),
|
2020-09-05 19:09:14 +00:00
|
|
|
ATTR_UNIT: PERCENTAGE,
|
2020-11-22 21:42:16 +00:00
|
|
|
ATTR_ENABLED: True,
|
2020-01-06 17:06:16 +00:00
|
|
|
},
|
|
|
|
ATTR_PF_KIT_1_REMAINING_LIFE: {
|
|
|
|
ATTR_ICON: "mdi:printer-3d",
|
|
|
|
ATTR_LABEL: ATTR_PF_KIT_1_REMAINING_LIFE.replace("_", " ").title(),
|
2020-09-05 19:09:14 +00:00
|
|
|
ATTR_UNIT: PERCENTAGE,
|
2020-11-22 21:42:16 +00:00
|
|
|
ATTR_ENABLED: True,
|
2020-01-06 17:06:16 +00:00
|
|
|
},
|
|
|
|
ATTR_PF_KIT_MP_REMAINING_LIFE: {
|
|
|
|
ATTR_ICON: "mdi:printer-3d",
|
|
|
|
ATTR_LABEL: ATTR_PF_KIT_MP_REMAINING_LIFE.replace("_", " ").title(),
|
2020-09-05 19:09:14 +00:00
|
|
|
ATTR_UNIT: PERCENTAGE,
|
2020-12-08 07:19:57 +00:00
|
|
|
ATTR_ENABLED: True,
|
2020-01-06 17:06:16 +00:00
|
|
|
},
|
|
|
|
ATTR_BLACK_TONER_REMAINING: {
|
|
|
|
ATTR_ICON: "mdi:printer-3d-nozzle",
|
|
|
|
ATTR_LABEL: ATTR_BLACK_TONER_REMAINING.replace("_", " ").title(),
|
2020-09-05 19:09:14 +00:00
|
|
|
ATTR_UNIT: PERCENTAGE,
|
2020-11-22 21:42:16 +00:00
|
|
|
ATTR_ENABLED: True,
|
2020-01-06 17:06:16 +00:00
|
|
|
},
|
|
|
|
ATTR_CYAN_TONER_REMAINING: {
|
|
|
|
ATTR_ICON: "mdi:printer-3d-nozzle",
|
|
|
|
ATTR_LABEL: ATTR_CYAN_TONER_REMAINING.replace("_", " ").title(),
|
2020-09-05 19:09:14 +00:00
|
|
|
ATTR_UNIT: PERCENTAGE,
|
2020-11-22 21:42:16 +00:00
|
|
|
ATTR_ENABLED: True,
|
2020-01-06 17:06:16 +00:00
|
|
|
},
|
|
|
|
ATTR_MAGENTA_TONER_REMAINING: {
|
|
|
|
ATTR_ICON: "mdi:printer-3d-nozzle",
|
|
|
|
ATTR_LABEL: ATTR_MAGENTA_TONER_REMAINING.replace("_", " ").title(),
|
2020-09-05 19:09:14 +00:00
|
|
|
ATTR_UNIT: PERCENTAGE,
|
2020-11-22 21:42:16 +00:00
|
|
|
ATTR_ENABLED: True,
|
2020-01-06 17:06:16 +00:00
|
|
|
},
|
|
|
|
ATTR_YELLOW_TONER_REMAINING: {
|
|
|
|
ATTR_ICON: "mdi:printer-3d-nozzle",
|
|
|
|
ATTR_LABEL: ATTR_YELLOW_TONER_REMAINING.replace("_", " ").title(),
|
2020-09-05 19:09:14 +00:00
|
|
|
ATTR_UNIT: PERCENTAGE,
|
2020-11-22 21:42:16 +00:00
|
|
|
ATTR_ENABLED: True,
|
2020-01-06 17:06:16 +00:00
|
|
|
},
|
|
|
|
ATTR_BLACK_INK_REMAINING: {
|
|
|
|
ATTR_ICON: "mdi:printer-3d-nozzle",
|
|
|
|
ATTR_LABEL: ATTR_BLACK_INK_REMAINING.replace("_", " ").title(),
|
2020-09-05 19:09:14 +00:00
|
|
|
ATTR_UNIT: PERCENTAGE,
|
2020-11-22 21:42:16 +00:00
|
|
|
ATTR_ENABLED: True,
|
2020-01-06 17:06:16 +00:00
|
|
|
},
|
|
|
|
ATTR_CYAN_INK_REMAINING: {
|
|
|
|
ATTR_ICON: "mdi:printer-3d-nozzle",
|
|
|
|
ATTR_LABEL: ATTR_CYAN_INK_REMAINING.replace("_", " ").title(),
|
2020-09-05 19:09:14 +00:00
|
|
|
ATTR_UNIT: PERCENTAGE,
|
2020-11-22 21:42:16 +00:00
|
|
|
ATTR_ENABLED: True,
|
2020-01-06 17:06:16 +00:00
|
|
|
},
|
|
|
|
ATTR_MAGENTA_INK_REMAINING: {
|
|
|
|
ATTR_ICON: "mdi:printer-3d-nozzle",
|
|
|
|
ATTR_LABEL: ATTR_MAGENTA_INK_REMAINING.replace("_", " ").title(),
|
2020-09-05 19:09:14 +00:00
|
|
|
ATTR_UNIT: PERCENTAGE,
|
2020-11-22 21:42:16 +00:00
|
|
|
ATTR_ENABLED: True,
|
2020-01-06 17:06:16 +00:00
|
|
|
},
|
|
|
|
ATTR_YELLOW_INK_REMAINING: {
|
|
|
|
ATTR_ICON: "mdi:printer-3d-nozzle",
|
|
|
|
ATTR_LABEL: ATTR_YELLOW_INK_REMAINING.replace("_", " ").title(),
|
2020-09-05 19:09:14 +00:00
|
|
|
ATTR_UNIT: PERCENTAGE,
|
2020-11-22 21:42:16 +00:00
|
|
|
ATTR_ENABLED: True,
|
|
|
|
},
|
|
|
|
ATTR_UPTIME: {
|
|
|
|
ATTR_ICON: None,
|
|
|
|
ATTR_LABEL: ATTR_UPTIME.title(),
|
|
|
|
ATTR_UNIT: None,
|
|
|
|
ATTR_ENABLED: False,
|
2020-01-06 17:06:16 +00:00
|
|
|
},
|
|
|
|
}
|