Better way to provide hass to popups, fix thomasloven/lovelace-popup-card#14
This commit is contained in:
parent
5fbed48b80
commit
ae9a3dcd7a
@ -369,14 +369,13 @@ class {
|
|||||||
moreInfo._page = "none";
|
moreInfo._page = "none";
|
||||||
moreInfo.shadowRoot.appendChild(popup);
|
moreInfo.shadowRoot.appendChild(popup);
|
||||||
moreInfo.large = large;
|
moreInfo.large = large;
|
||||||
|
document.querySelector("home-assistant").provideHass(message);
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
let interval = setInterval(() => {
|
let interval = setInterval(() => {
|
||||||
if (moreInfo.getAttribute('aria-hidden')) {
|
if (moreInfo.getAttribute('aria-hidden')) {
|
||||||
popup.parentNode.removeChild(popup);
|
popup.parentNode.removeChild(popup);
|
||||||
clearInterval(interval);
|
clearInterval(interval);
|
||||||
} else {
|
|
||||||
message.hass = this.hass;
|
|
||||||
}
|
}
|
||||||
}, 100)
|
}, 100)
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user