Keep the drum-clean unit in code rather than the catalog
Home Assistant resolves a catalog `unit_of_measurement` against the default language, not the user's (entity_platform re-fetches 'en' for exactly this key), because a unit is part of the state's identity -- the recorder writes it into statistics metadata and compares it across restarts. Localizing it would make switching Home Assistant's language look like a unit change and suppress the sensor's statistics. So the six non-English entries were never read, and the English one only restated what `unit="cycles"` already said. Same displayed unit either way; this drops seven catalog keys that looked translatable but weren't.
This commit is contained in:
@@ -70,6 +70,7 @@ DRYER_COURSE = Capability(
|
||||
),
|
||||
SensorDesc(
|
||||
key="drum_clean_cycles_remaining",
|
||||
unit="cycles",
|
||||
icon="mdi:tumble-dryer-alert",
|
||||
state_class="measurement",
|
||||
exists_fn=lambda rep, resources: drum_clean_cycles_remaining(rep) is not None,
|
||||
|
||||
@@ -275,6 +275,7 @@ WASHER_COURSE = Capability(
|
||||
),
|
||||
SensorDesc(
|
||||
key="drum_clean_cycles_remaining",
|
||||
unit="cycles",
|
||||
icon="mdi:washing-machine-alert",
|
||||
state_class="measurement",
|
||||
exists_fn=lambda rep, resources: drum_clean_cycles_remaining(rep) is not None,
|
||||
|
||||
@@ -946,8 +946,7 @@
|
||||
}
|
||||
},
|
||||
"drum_clean_cycles_remaining": {
|
||||
"name": "Čištění bubnu za",
|
||||
"unit_of_measurement": "cyklů"
|
||||
"name": "Čištění bubnu za"
|
||||
},
|
||||
"drum_clean_last_cleaned": {
|
||||
"name": "Poslední čištění bubnu"
|
||||
|
||||
@@ -940,8 +940,7 @@
|
||||
}
|
||||
},
|
||||
"drum_clean_cycles_remaining": {
|
||||
"name": "Trommelreinigung fällig in",
|
||||
"unit_of_measurement": "Zyklen"
|
||||
"name": "Trommelreinigung fällig in"
|
||||
},
|
||||
"drum_clean_last_cleaned": {
|
||||
"name": "Trommel zuletzt gereinigt"
|
||||
|
||||
@@ -946,8 +946,7 @@
|
||||
}
|
||||
},
|
||||
"drum_clean_cycles_remaining": {
|
||||
"name": "Drum clean due in",
|
||||
"unit_of_measurement": "cycles"
|
||||
"name": "Drum clean due in"
|
||||
},
|
||||
"drum_clean_last_cleaned": {
|
||||
"name": "Drum last cleaned"
|
||||
|
||||
@@ -1139,8 +1139,7 @@
|
||||
}
|
||||
},
|
||||
"drum_clean_cycles_remaining": {
|
||||
"name": "Limpieza de tambor en",
|
||||
"unit_of_measurement": "ciclos"
|
||||
"name": "Limpieza de tambor en"
|
||||
},
|
||||
"drum_clean_last_cleaned": {
|
||||
"name": "Última limpieza del tambor"
|
||||
|
||||
@@ -946,8 +946,7 @@
|
||||
}
|
||||
},
|
||||
"drum_clean_cycles_remaining": {
|
||||
"name": "Pulizia cestello fra",
|
||||
"unit_of_measurement": "cicli"
|
||||
"name": "Pulizia cestello fra"
|
||||
},
|
||||
"drum_clean_last_cleaned": {
|
||||
"name": "Ultima pulizia cestello"
|
||||
|
||||
@@ -946,8 +946,7 @@
|
||||
}
|
||||
},
|
||||
"drum_clean_cycles_remaining": {
|
||||
"name": "통세척까지 남은 횟수",
|
||||
"unit_of_measurement": "회"
|
||||
"name": "통세척까지 남은 횟수"
|
||||
},
|
||||
"drum_clean_last_cleaned": {
|
||||
"name": "마지막 통세척"
|
||||
|
||||
@@ -946,8 +946,7 @@
|
||||
}
|
||||
},
|
||||
"drum_clean_cycles_remaining": {
|
||||
"name": "Trommelreiniging over",
|
||||
"unit_of_measurement": "cycli"
|
||||
"name": "Trommelreiniging over"
|
||||
},
|
||||
"drum_clean_last_cleaned": {
|
||||
"name": "Trommel laatst gereinigd"
|
||||
|
||||
Reference in New Issue
Block a user