diff --git a/custom_components/localthings/registry/capabilities/dryer.py b/custom_components/localthings/registry/capabilities/dryer.py index f4d7b51..7f02b8d 100644 --- a/custom_components/localthings/registry/capabilities/dryer.py +++ b/custom_components/localthings/registry/capabilities/dryer.py @@ -27,7 +27,17 @@ DRYER_SETTINGS = Capability( entities=( SensorDesc(key="dry_level", field="x.com.samsung.da.dryLevel", icon="mdi:water-percent"), SensorDesc(key="dry_time", field="x.com.samsung.da.dryTime", icon="mdi:timer"), - SensorDesc(key="dryer_type", field="x.com.samsung.da.dryerType", icon="mdi:tumble-dryer"), + SensorDesc( + key="dryer_type", + field="x.com.samsung.da.dryerType", + icon="mdi:tumble-dryer", + device_class="enum", + # Only 'Electricity' confirmed across shipped fixtures (#366); an + # unrecognized value still passes through raw via sensor.py's + # options property rather than breaking the entity. + options=("electricity",), + value_fn=lambda v: v.lower() if isinstance(v, str) else v, + ), SwitchDesc( key="wrinkle_prevent", field="x.com.samsung.da.wrinklePrevent", diff --git a/custom_components/localthings/translations/cs.json b/custom_components/localthings/translations/cs.json index 8af70be..b20383a 100644 --- a/custom_components/localthings/translations/cs.json +++ b/custom_components/localthings/translations/cs.json @@ -958,7 +958,10 @@ "name": "Doba sušení" }, "dryer_type": { - "name": "Typ sušičky" + "name": "Typ sušičky", + "state": { + "electricity": "Elektřina" + } }, "dust": { "name": "Prach" @@ -1098,6 +1101,7 @@ "steaming": "Napařování", "airwashing": "Osvěžení vzduchem", "drying": "Sušení", + "dryingwithdooropen": "Větrání", "cooling": "Chlazení", "predrain": "Vypouštění", "prewash": "Předpírka" diff --git a/custom_components/localthings/translations/de.json b/custom_components/localthings/translations/de.json index 9e54ce5..1fcaee4 100644 --- a/custom_components/localthings/translations/de.json +++ b/custom_components/localthings/translations/de.json @@ -952,7 +952,10 @@ "name": "Trockenzeit" }, "dryer_type": { - "name": "Trocknertyp" + "name": "Trocknertyp", + "state": { + "electricity": "Strom" + } }, "dust": { "name": "Staub" @@ -1092,6 +1095,7 @@ "steaming": "Dämpfen", "airwashing": "Luftreinigung", "drying": "Trocknen", + "dryingwithdooropen": "Lüften", "cooling": "Abkühlen", "predrain": "Abpumpen", "prewash": "Vorwäsche" diff --git a/custom_components/localthings/translations/en.json b/custom_components/localthings/translations/en.json index 98d21b1..769cdf8 100644 --- a/custom_components/localthings/translations/en.json +++ b/custom_components/localthings/translations/en.json @@ -958,7 +958,10 @@ "name": "Dry time" }, "dryer_type": { - "name": "Dryer type" + "name": "Dryer type", + "state": { + "electricity": "Electricity" + } }, "dust": { "name": "Dust" @@ -1098,6 +1101,7 @@ "steaming": "Steaming", "airwashing": "Air washing", "drying": "Drying", + "dryingwithdooropen": "Venting", "cooling": "Cooling", "predrain": "Pre-drain", "prewash": "Pre-wash" diff --git a/custom_components/localthings/translations/es.json b/custom_components/localthings/translations/es.json index 399fbb2..8a418a0 100644 --- a/custom_components/localthings/translations/es.json +++ b/custom_components/localthings/translations/es.json @@ -1151,7 +1151,10 @@ "name": "Tiempo de secado" }, "dryer_type": { - "name": "Tipo de secadora" + "name": "Tipo de secadora", + "state": { + "electricity": "Electricidad" + } }, "dust": { "name": "Polvo" @@ -1291,6 +1294,7 @@ "steaming": "Vaporización", "airwashing": "Lavado con aire", "drying": "Secado", + "dryingwithdooropen": "Ventilación", "cooling": "Enfriamiento", "predrain": "Drenaje previo", "prewash": "Prelavado" diff --git a/custom_components/localthings/translations/it.json b/custom_components/localthings/translations/it.json index 8bcbd6b..456a6c0 100644 --- a/custom_components/localthings/translations/it.json +++ b/custom_components/localthings/translations/it.json @@ -958,7 +958,10 @@ "name": "Tempo di asciugatura" }, "dryer_type": { - "name": "Tipo di asciugatrice" + "name": "Tipo di asciugatrice", + "state": { + "electricity": "Elettricità" + } }, "dust": { "name": "Polvere" @@ -1098,6 +1101,7 @@ "steaming": "Vapore", "airwashing": "Lavaggio ad aria", "drying": "Asciugatura", + "dryingwithdooropen": "Ventilazione", "cooling": "Raffreddamento", "predrain": "Scarico preliminare", "prewash": "Prelavaggio" diff --git a/custom_components/localthings/translations/ko.json b/custom_components/localthings/translations/ko.json index aab7879..164437f 100644 --- a/custom_components/localthings/translations/ko.json +++ b/custom_components/localthings/translations/ko.json @@ -958,7 +958,10 @@ "name": "건조 시간" }, "dryer_type": { - "name": "건조기 유형" + "name": "건조기 유형", + "state": { + "electricity": "전기" + } }, "dust": { "name": "미세먼지" @@ -1098,6 +1101,7 @@ "steaming": "스팀", "airwashing": "에어워시", "drying": "건조", + "dryingwithdooropen": "환기", "cooling": "냉각", "predrain": "사전 배수", "prewash": "애벌빨래" diff --git a/custom_components/localthings/translations/nl.json b/custom_components/localthings/translations/nl.json index ec45195..81b57c4 100644 --- a/custom_components/localthings/translations/nl.json +++ b/custom_components/localthings/translations/nl.json @@ -958,7 +958,10 @@ "name": "Droogtijd" }, "dryer_type": { - "name": "Type droger" + "name": "Type droger", + "state": { + "electricity": "Elektriciteit" + } }, "dust": { "name": "Stof" @@ -1098,6 +1101,7 @@ "steaming": "Stomen", "airwashing": "Luchtreiniging", "drying": "Drogen", + "dryingwithdooropen": "Ventileren", "cooling": "Koelen", "predrain": "Vooraf afpompen", "prewash": "Voorwas"