Lots of changes and modernization. WIP

This commit is contained in:
2022-07-13 21:02:47 +00:00
parent 69e9642b4b
commit 466a5eb5e7
26 changed files with 1691 additions and 1185 deletions

View File

@@ -8,7 +8,10 @@ export const BrowserModBrowserMixin = (C) =>
document.addEventListener("visibilitychange", () => this.sensor_update());
window.addEventListener("location-changed", () => this.sensor_update());
window.setInterval(() => this.sensor_update(), 10000);
this.addEventListener("browser-mod-connected", () =>
this.sensor_update()
);
// window.setInterval(() => this.sensor_update(), 10000);
}
sensor_update() {
@@ -28,7 +31,7 @@ export const BrowserModBrowserMixin = (C) =>
charging: window.fully?.isPlugged() ?? battery?.charging,
darkMode: this.hass?.themes?.darkMode,
userData: this.hass?.user,
config: this.config,
// config: this.config,
},
});
};