mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Show unknown attribute state as Unknown instead of a dash (#15846)
This commit is contained in:
parent
952028a7be
commit
dd08909fef
@ -27,9 +27,9 @@ export const computeAttributeValueDisplay = (
|
|||||||
const attributeValue =
|
const attributeValue =
|
||||||
value !== undefined ? value : stateObj.attributes[attribute];
|
value !== undefined ? value : stateObj.attributes[attribute];
|
||||||
|
|
||||||
// Null value, return dash
|
// Null value, the state is unknown
|
||||||
if (attributeValue === null) {
|
if (attributeValue === null) {
|
||||||
return "—";
|
return localize("state.default.unknown");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number value, return formatted number
|
// Number value, return formatted number
|
||||||
|
Loading…
x
Reference in New Issue
Block a user