diff --git a/xiaoshi-pad-climate-card.js b/xiaoshi-pad-climate-card.js index abc03f1..df0d9eb 100644 --- a/xiaoshi-pad-climate-card.js +++ b/xiaoshi-pad-climate-card.js @@ -933,32 +933,15 @@ class XiaoshiPadClimateCardEditor extends LitElement {
- +
- -
- - -
- 输入高度值,例如:300px -
-
- - `; } @@ -1315,7 +1298,6 @@ class XiaoshiPadClimateCard extends LitElement { return { hass: { type: Object }, width: { type: String, attribute: true }, - height: { type: String, attribute: true }, config: { type: Object }, buttons: { type: Array }, theme: { type: String }, @@ -1344,7 +1326,6 @@ class XiaoshiPadClimateCard extends LitElement { this.buttons2 = config.buttons2 || []; this._externalTempSensor = config.temperature || null; if (config.width !== undefined) this.width = config.width; - if (config.height !== undefined) this.height = config.height; this.requestUpdate(); } @@ -1361,7 +1342,7 @@ class XiaoshiPadClimateCard extends LitElement { position: relative; background-color: var(--bg-color); border-radius: 15px; - width: 300px; + width: var(--card-width, 300px); } .side-button-wrapper { @@ -1378,7 +1359,7 @@ class XiaoshiPadClimateCard extends LitElement { .thermostat-card { position: relative; - width: 300px; + width: var(--card-width, 300px); height: 265px; display: flex; flex-direction: column; @@ -1386,7 +1367,7 @@ class XiaoshiPadClimateCard extends LitElement { .thermostat-container { flex: 1; - width: 300px; + width: var(--card-width, 300px); height: 265px; position: relative; } @@ -1523,7 +1504,6 @@ class XiaoshiPadClimateCard extends LitElement { this.buttons2 = []; this.theme = 'on'; this.width = '300px'; - this.height = '300px'; this._timerInterval = null; this.temperatureData = []; this.canvas = null; @@ -1743,7 +1723,7 @@ class XiaoshiPadClimateCard extends LitElement { ` : ''} -
+
@@ -2434,4 +2414,4 @@ _renderExtraButtons(buttonType = 1) { } } -customElements.define('xiaoshi-pad-climate-card', XiaoshiPadClimateCard); \ No newline at end of file +customElements.define('xiaoshi-pad-climate-card', XiaoshiPadClimateCard);