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..c929888 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" diff --git a/custom_components/localthings/translations/de.json b/custom_components/localthings/translations/de.json index 9e54ce5..8229aef 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" diff --git a/custom_components/localthings/translations/en.json b/custom_components/localthings/translations/en.json index 98d21b1..fb2ec6b 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" diff --git a/custom_components/localthings/translations/es.json b/custom_components/localthings/translations/es.json index 399fbb2..29a6338 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" diff --git a/custom_components/localthings/translations/it.json b/custom_components/localthings/translations/it.json index 8bcbd6b..605fa0b 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" diff --git a/custom_components/localthings/translations/ko.json b/custom_components/localthings/translations/ko.json index aab7879..fb4c452 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": "미세먼지" diff --git a/custom_components/localthings/translations/nl.json b/custom_components/localthings/translations/nl.json index ec45195..5e64766 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"