Flag enums as enums with option list #35

This commit is contained in:
Andre Basche 2023-05-07 02:34:41 +02:00
parent c0fda4cd1b
commit 7e40afae68

View file

@ -34,7 +34,34 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = {
key="prPhase",
name="Program Phase",
icon="mdi:washing-machine",
device_class=SensorDeviceClass.ENUM,
translation_key="program_phases_wm",
options=[
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"9",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"20",
"24",
"25",
"26",
"27",
],
),
SensorEntityDescription(
key="totalElectricityUsed",
@ -88,7 +115,9 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = {
key="machMode",
name="Machine Status",
icon="mdi:information",
device_class=SensorDeviceClass.ENUM,
translation_key="washing_modes",
options=["0", "1", "3", "4", "5", "6", "7"],
),
SensorEntityDescription(
key="errors", name="Error", icon="mdi:math-log", translation_key="errors"
@ -161,7 +190,9 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = {
key="machMode",
name="Machine Status",
icon="mdi:information",
device_class=SensorDeviceClass.ENUM,
translation_key="washing_modes",
options=["0", "1", "3", "4", "5", "6", "7"],
),
SensorEntityDescription(
key="errors", name="Error", icon="mdi:math-log", translation_key="errors"
@ -192,13 +223,29 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = {
key="prPhase",
name="Program Phase",
icon="mdi:washing-machine",
device_class=SensorDeviceClass.ENUM,
translation_key="program_phases_td",
options=[
"0",
"1",
"2",
"3",
"13",
"14",
"15",
"16",
"18",
"19",
"20",
],
),
SensorEntityDescription(
key="dryLevel",
name="Dry level",
icon="mdi:hair-dryer",
device_class=SensorDeviceClass.ENUM,
translation_key="dry_levels",
options=["0", "1", "2", "3", "4", "12", "13", "14", "15"],
),
SensorEntityDescription(
key="tempLevel",
@ -290,7 +337,9 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = {
key="machMode",
name="Machine Status",
icon="mdi:information",
device_class=SensorDeviceClass.ENUM,
translation_key="washing_modes",
options=["0", "1", "3", "4", "5", "6", "7"],
),
SensorEntityDescription(
key="spinSpeed",
@ -318,7 +367,34 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = {
key="prPhase",
name="Program Phase",
icon="mdi:washing-machine",
device_class=SensorDeviceClass.ENUM,
translation_key="program_phases_wm",
options=[
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"9",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"20",
"24",
"25",
"26",
"27",
],
),
SensorEntityDescription(
key="dryLevel",
@ -458,7 +534,9 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = {
key="machMode",
name="Machine Status",
icon="mdi:information",
device_class=SensorDeviceClass.ENUM,
translation_key="washing_modes",
options=["0", "1", "3", "4", "5", "6", "7"],
),
SensorEntityDescription(
key="errors", name="Error", icon="mdi:math-log", translation_key="errors"
@ -475,7 +553,9 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = {
key="prPhase",
name="Program Phase",
icon="mdi:washing-machine",
device_class=SensorDeviceClass.ENUM,
translation_key="program_phases_dw",
options=["0", "1", "2", "3", "4", "5", "6"],
),
),
}