mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-15 05:16:34 +00:00
More info cleanup
This commit is contained in:
parent
493e86ae5f
commit
ef2eb004f4
@ -70,14 +70,6 @@ export default Polymer({
|
|||||||
this.shouldFetchHistory) {
|
this.shouldFetchHistory) {
|
||||||
entityHistoryActions.fetchRecent(this.stateObj.entityId);
|
entityHistoryActions.fetchRecent(this.stateObj.entityId);
|
||||||
}
|
}
|
||||||
if(this.stateObj) {
|
|
||||||
if(DOMAINS_WITH_NO_HISTORY.indexOf(this.stateObj.domain) !== -1) {
|
|
||||||
this.showHistoryComponent = false;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
this.showHistoryComponent = this.hasHistoryComponent;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
stateObjChanged(newVal) {
|
stateObjChanged(newVal) {
|
||||||
@ -86,15 +78,22 @@ export default Polymer({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.fetchHistoryData();
|
this.showHistoryComponent = (
|
||||||
|
DOMAINS_WITH_NO_HISTORY.indexOf(this.stateObj.domain) === -1 &&
|
||||||
|
this.hasHistoryComponent
|
||||||
|
);
|
||||||
|
|
||||||
// allow dialog to render content before showing it so it is
|
this.async(() => {
|
||||||
// positioned correctly.
|
// Firing action while other action is happening confuses nuclear
|
||||||
this.async(() => this.dialogOpen = true, 10);
|
this.fetchHistoryData();
|
||||||
|
// allow dialog to render content before showing it so it is
|
||||||
|
// positioned correctly.
|
||||||
|
this.dialogOpen = true
|
||||||
|
}, 10);
|
||||||
},
|
},
|
||||||
|
|
||||||
dialogOpenChanged(newVal) {
|
dialogOpenChanged(newVal) {
|
||||||
if (!newVal) {
|
if (!newVal && this.stateObj) {
|
||||||
moreInfoActions.deselectEntity();
|
moreInfoActions.deselectEntity();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user