From 3a39798dfc8ad14582a85078b08a2a1c5d6f874f Mon Sep 17 00:00:00 2001 From: xiaoshi <115949669+xiaoshi930@users.noreply.github.com> Date: Sun, 23 Nov 2025 22:48:17 +0800 Subject: [PATCH] Add files via upload --- xiaoshi-device-offline-card.js | 858 +++++++++++++++++++++++++++++++ xiaoshi-device-update-card.js | 897 +++++++++++++++++++++++++++++++++ 2 files changed, 1755 insertions(+) create mode 100644 xiaoshi-device-offline-card.js create mode 100644 xiaoshi-device-update-card.js 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` +