mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-09 18:36:35 +00:00
Picture Entity to use name instead of titles (#1388)
Entities have names, states have titles.
This commit is contained in:
parent
e452384ecd
commit
173cd8126c
@ -55,7 +55,7 @@ class HuiPictureEntityCard extends LocalizeMixin(PolymerElement) {
|
||||
entity="[[_config.entity]]"
|
||||
></hui-image>
|
||||
<div class="box">
|
||||
<div id="title"></div>
|
||||
<div id="name"></div>
|
||||
<div id="state"></div>
|
||||
</div>
|
||||
</ha-card>
|
||||
@ -101,7 +101,7 @@ class HuiPictureEntityCard extends LocalizeMixin(PolymerElement) {
|
||||
_updateState(hass, entityId, config) {
|
||||
const state = entityId in hass.states ? hass.states[entityId].state : UNAVAILABLE;
|
||||
|
||||
this.$.title.innerText = config.title || (state === UNAVAILABLE ?
|
||||
this.$.name.innerText = config.name || (state === UNAVAILABLE ?
|
||||
entityId : computeStateName(hass.states[entityId]));
|
||||
this.$.state.innerText = state === UNAVAILABLE ?
|
||||
UNAVAILABLE : this._computeState(hass.states[entityId]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user