Handle optional state enum from sensor entities (#14428)

This commit is contained in:
Franck Nijhof 2022-12-05 15:01:18 +01:00 committed by GitHub
parent 07ad429f8c
commit f0127511b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -261,6 +261,11 @@ export const getStates = (
result.push(...state.attributes.activity_list);
}
break;
case "sensor":
if (!attribute && state.attributes.device_class === "enum") {
result.push(...state.attributes.options);
}
break;
case "vacuum":
if (attribute === "fan_speed") {
result.push(...state.attributes.fan_speed_list);