mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 08:16:36 +00:00
Fill state details when entity selected (#3615)
This commit is contained in:
parent
164e433592
commit
0008a100f4
@ -74,6 +74,7 @@ class HaPanelDevState extends EventsMixin(PolymerElement) {
|
||||
autofocus
|
||||
hass="[[hass]]"
|
||||
value="{{_entityId}}"
|
||||
on-change="entityIdChanged"
|
||||
allow-custom-entity
|
||||
></ha-entity-picker>
|
||||
<paper-input
|
||||
@ -214,6 +215,12 @@ class HaPanelDevState extends EventsMixin(PolymerElement) {
|
||||
ev.preventDefault();
|
||||
}
|
||||
|
||||
entityIdChanged() {
|
||||
var state = this.hass.states[this._entityId];
|
||||
this._state = state.state;
|
||||
this._stateAttributes = JSON.stringify(state.attributes, null, " ");
|
||||
}
|
||||
|
||||
entityMoreInfo(ev) {
|
||||
ev.preventDefault();
|
||||
this.fire("hass-more-info", { entityId: ev.model.entity.entity_id });
|
||||
|
Loading…
x
Reference in New Issue
Block a user