From 65a5832eda7446dcba793c449ce03ddc48932761 Mon Sep 17 00:00:00 2001 From: xiaoshi <115949669+xiaoshi930@users.noreply.github.com> Date: Tue, 27 Jan 2026 20:38:45 +0800 Subject: [PATCH] Update xiaoshi-pad-climate-card.js --- xiaoshi-pad-climate-card.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/xiaoshi-pad-climate-card.js b/xiaoshi-pad-climate-card.js index 7b53aa8..22af265 100644 --- a/xiaoshi-pad-climate-card.js +++ b/xiaoshi-pad-climate-card.js @@ -166,7 +166,10 @@ class XiaoshiPadClimateCardEditor extends LitElement { if (this.config.show_humidifier_modes === undefined) { this.config.show_humidifier_modes = this._availableModes.hasHumidifierModes; } - if (this.config.show_humidifier_switch === undefined) { + // 加湿器实体时,自动设置显示加湿器开关为 true + if (isHumidifierEntity) { + this.config.show_humidifier_switch = true; + } else if (this.config.show_humidifier_switch === undefined) { this.config.show_humidifier_switch = this._availableModes.hasHumidifierSwitch; } @@ -977,11 +980,11 @@ class XiaoshiPadClimateCardEditor extends LitElement { ${this._renderModeFilter('available_modes', '加湿器模式筛选')} ` : ''} - ${this._availableModes?.hasHumidifierSwitch ? html` + ${this.config.entity?.startsWith('humidifier.') ? html`