diff --git a/src/util/hass-attributes-util.js b/src/util/hass-attributes-util.js index b9757e9638..e6d6a7e322 100644 --- a/src/util/hass-attributes-util.js +++ b/src/util/hass-attributes-util.js @@ -46,6 +46,7 @@ hassAttributeUtil.DOMAIN_DEVICE_CLASS = { "power", "signal_strength", ], + switch: ["switch", "outlet"], }; hassAttributeUtil.UNKNOWN_TYPE = "json"; @@ -88,7 +89,7 @@ hassAttributeUtil.LOGIC_STATE_ATTRIBUTES = hassAttributeUtil.LOGIC_STATE_ATTRIBU type: "array", options: hassAttributeUtil.DOMAIN_DEVICE_CLASS, description: "Device class", - domains: ["binary_sensor", "cover", "sensor"], + domains: ["binary_sensor", "cover", "sensor", "switch"], }, hidden: { type: "boolean", description: "Hide from UI" }, assumed_state: {