diff --git a/xiaoshi-device-offline-card.js b/xiaoshi-device-offline-card.js new file mode 100644 index 0000000..975a077 --- /dev/null +++ b/xiaoshi-device-offline-card.js @@ -0,0 +1,858 @@ +import { LitElement, html, css } from "https://unpkg.com/lit-element@2.4.0/lit-element.js?module"; + +class XiaoshiOfflineCardEditor extends LitElement { + static get properties() { + return { + hass: { type: Object }, + config: { type: Object } + }; + } + + static get styles() { + return css` + .form { + display: flex; + flex-direction: column; + gap: 10px; + } + .form-group { + display: flex; + flex-direction: column; + gap: 5px; + } + label { + font-weight: bold; + } + select, input, textarea { + padding: 8px; + border: 1px solid #ddd; + border-radius: 4px; + } + textarea { + min-height: 80px; + resize: vertical; + } + .help-text { + font-size: 0.85em; + color: #666; + margin-top: 4px; + } + `; + } + + render() { + if (!this.hass) return html``; + + return html` +