1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-24 20:55:49 +00:00

Nullish coalescing entity card (#6484)

Fixes #6483
This commit is contained in:
Bram Kragten
2020-07-29 15:40:28 +02:00
committed by GitHub
parent 29bdf7877c
commit 83876fb9da

View File

@@ -124,7 +124,7 @@ export class HuiEntityCard extends LitElement implements LovelaceCard {
<div class="info">
<span class="value"
>${"attribute" in this._config
? stateObj.attributes[this._config.attribute!] ||
? stateObj.attributes[this._config.attribute!] ??
this.hass.localize("state.default.unknown")
: stateObj.attributes.unit_of_measurement
? stateObj.state