custom_components/bahmcloud_store/panel/panel.js hinzugefügt

This commit is contained in:
2026-01-14 18:31:11 +00:00
parent 9d427a39d2
commit baac800e17

View File

@@ -0,0 +1,25 @@
class BahmcloudStorePanel extends HTMLElement {
set hass(hass) {
if (this._rendered) return;
this._rendered = true;
const root = this.attachShadow({ mode: "open" });
const iframe = document.createElement("iframe");
iframe.src = "/api/bahmcloud_store_static/index.html";
iframe.style.width = "100%";
iframe.style.height = "100%";
iframe.style.border = "0";
iframe.style.display = "block";
const style = document.createElement("style");
style.textContent = `
:host { display: block; height: 100vh; }
`;
root.appendChild(style);
root.appendChild(iframe);
}
}
customElements.define("bahmcloud-store-panel", BahmcloudStorePanel);