diff --git a/src/panels/config/zwave/zwave-network.js b/src/panels/config/zwave/zwave-network.ts similarity index 69% rename from src/panels/config/zwave/zwave-network.js rename to src/panels/config/zwave/zwave-network.ts index 65c0b076ad..aeed3c23c0 100644 --- a/src/panels/config/zwave/zwave-network.js +++ b/src/panels/config/zwave/zwave-network.ts @@ -1,6 +1,17 @@ import "@polymer/paper-icon-button/paper-icon-button"; -import { html } from "@polymer/polymer/lib/utils/html-tag"; -import { PolymerElement } from "@polymer/polymer/polymer-element"; + +import { + css, + CSSResult, + customElement, + html, + LitElement, + property, + TemplateResult, +} from "lit-element"; + +import { haStyle } from "../../../resources/styles"; +import { HomeAssistant } from "../../../types"; import "../../../components/buttons/ha-call-api-button"; import "../../../components/buttons/ha-call-service-button"; @@ -8,10 +19,184 @@ import "../../../components/ha-service-description"; import "../../../components/ha-card"; import "../ha-config-section"; -class ZwaveNetwork extends PolymerElement { - static get template() { +@customElement("zwave-network") +export class ZwaveNetwork extends LitElement { + @property() public hass!: HomeAssistant; + @property() public isWide!: boolean; + @property() private _showHelp = false; + + protected render(): TemplateResult | void { return html` - - -
- Z-Wave Network Management - -
- - Run commands that affect the Z-Wave network. You won't get feedback on - whether the command succeeded, but you can look in the OZW Log to try - to figure out. - - - -
- - Add Node Secure - - - - - - Add Node - - - - - - Remove Node - - - -
-
- - Cancel Command - - - -
-
- - Heal Network - - - - Start Network - - - - - - Stop Network - - - - - - Soft Reset - - - - - - Test Network - - - - - - Save Config - -
-
-
- `; - } - - static get properties() { - return { - hass: Object, - - isWide: { - type: Boolean, - value: false, - }, - - showDescription: { - type: Boolean, - value: false, - }, - }; - } - - helpTap() { - this.showDescription = !this.showDescription; + `, + ]; } } -customElements.define("zwave-network", ZwaveNetwork); +declare global { + interface HTMLElementTagNameMap { + "zwave-network": ZwaveNetwork; + } +}