import { LitElement, html, css } from "lit"; import { deviceID } from "card-tools/src/deviceID"; class BrowserModPanel extends LitElement { hass; narrow; render() { return html` Browser Mod Settingss Enable Enable this browser as a Device in Home Assistant DeviceID The device ID is a unique identifier for your browser/device combination. Enable Camera Get Camera input from this device (hardware dependent) Update Cool function Enabling this will cause cool stuff to happen. Another function Enabling this will cause less cool stuff to happen. `; } static get styles() { return [ ...(customElements.get("ha-config-dashboard") as any).styles, css` :host { --app-header-background-color: var(--sidebar-background-color); --app-header-text-color: var(--sidebar-text-color); --app-header-border-bottom: 1px solid var(--divider-color); } .card-actions { display: flex; } .spacer { flex-grow: 1; } ha-textfield { width: 250px; display: block; margin-top: 8px; } .option { display: flex; margin-top: 16px; } .option h3 { flex-grow: 1; margin: 0; } .option ha-switch { margin-top: 0.25em; margin-right: 7px; margin-left: 0.5em; } `, ]; } } const loadDevTools = async () => { if (customElements.get("ha-config-dashboard")) return; const ppResolver = document.createElement("partial-panel-resolver"); const routes = (ppResolver as any).getRoutes([ { component_name: "config", url_path: "a", }, ]); await routes?.routes?.a?.load?.(); const configRouter = document.createElement("ha-panel-config"); await (configRouter as any)?.routerOptions?.routes?.dashboard?.load?.(); await customElements.whenDefined("ha-config-dashboard"); }; loadDevTools().then(() => { customElements.define("browser-mod-panel", BrowserModPanel); });