diff --git a/src/panels/config/entities/entity-registry-settings.ts b/src/panels/config/entities/entity-registry-settings.ts
index e8125074d9..6c46903632 100644
--- a/src/panels/config/entities/entity-registry-settings.ts
+++ b/src/panels/config/entities/entity-registry-settings.ts
@@ -367,9 +367,24 @@ export class EntityRegistrySettings extends SubscribeMixin(LitElement) {
@selected=${this._switchAsChanged}
@closed=${stopPropagation}
>
-
- ${domainToName(this.hass.localize, "switch")}
+ ${this.hass.localize(
+ "ui.dialogs.entity_registry.editor.device_classes.switch.switch"
+ )}
+
+
+ ${this.hass.localize(
+ "ui.dialogs.entity_registry.editor.device_classes.switch.outlet"
+ )}
+
${this._switchAsDomainsSorted(
SWITCH_AS_DOMAINS,
@@ -617,7 +632,15 @@ export class EntityRegistrySettings extends SubscribeMixin(LitElement) {
if (ev.target.value === "") {
return;
}
- this._switchAs = ev.target.value;
+
+ // If value is "outlet" that means the user kept the "switch" domain, but actually changed
+ // the device_class of the switch to "outlet".
+ const switchAs = ev.target.value === "outlet" ? "switch" : ev.target.value;
+ this._switchAs = switchAs;
+
+ if (ev.target.value === "outlet" || ev.target.value === "switch") {
+ this._deviceClass = ev.target.value;
+ }
}
private _areaPicked(ev: CustomEvent) {
diff --git a/src/translations/en.json b/src/translations/en.json
index 824a63d04e..02daa046d6 100755
--- a/src/translations/en.json
+++ b/src/translations/en.json
@@ -853,6 +853,10 @@
"curtain": "Curtain",
"damper": "Damper",
"shutter": "Shutter"
+ },
+ "switch": {
+ "outlet": "Outlet",
+ "switch": "Switch"
}
},
"unavailable": "This entity is unavailable.",