Show unknown attribute state as Unknown instead of a dash (#15846)

This commit is contained in:
Franck Nijhof
2023-03-17 16:21:23 +01:00
committed by GitHub
parent 952028a7be
commit dd08909fef

View File

@@ -27,9 +27,9 @@ export const computeAttributeValueDisplay = (
const attributeValue =
value !== undefined ? value : stateObj.attributes[attribute];
// Null value, return dash
// Null value, the state is unknown
if (attributeValue === null) {
return "—";
return localize("state.default.unknown");
}
// Number value, return formatted number