mirror of
https://github.com/xiaoshi930/xiaoshi-pad-card.git
synced 2026-02-27 14:06:34 +00:00
Update xiaoshi-pad-climate-card.js
This commit is contained in:
@@ -681,49 +681,6 @@ class XiaoshiPadClimateCardEditor extends LitElement {
|
|||||||
<option value="off">深色主题(深灰底白字)</option>
|
<option value="off">深色主题(深灰底白字)</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 温度传感器 -->
|
|
||||||
<div class="form-group">
|
|
||||||
<label>温度传感器 (可选)</label>
|
|
||||||
<div class="entity-selector-with-remove">
|
|
||||||
<div class="entity-selector">
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
@input=${this._onTemperatureSearch}
|
|
||||||
@focus=${this._onTemperatureSearch}
|
|
||||||
.value=${this._temperatureSearchTerm || this.config.temperature || ''}
|
|
||||||
placeholder="搜索传感器..."
|
|
||||||
class="entity-search-input"
|
|
||||||
/>
|
|
||||||
${this._showTemperatureList ? html`
|
|
||||||
<div class="entity-dropdown">
|
|
||||||
${this._filteredTemperatureEntities.map(entity => html`
|
|
||||||
<div
|
|
||||||
class="entity-option ${this.config.temperature === entity.entity_id ? 'selected' : ''}"
|
|
||||||
@click=${() => this._selectTemperature(entity.entity_id)}
|
|
||||||
>
|
|
||||||
<div class="entity-info">
|
|
||||||
<ha-icon icon="${entity.attributes.icon || 'mdi:help-circle'}"></ha-icon>
|
|
||||||
<div class="entity-details">
|
|
||||||
<div class="entity-name">${entity.attributes.friendly_name || entity.entity_id}</div>
|
|
||||||
<div class="entity-id">${entity.entity_id}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
${this.config.temperature === entity.entity_id ?
|
|
||||||
html`<ha-icon icon="mdi:check" class="check-icon"></ha-icon>` : ''}
|
|
||||||
</div>
|
|
||||||
`)}
|
|
||||||
${this._filteredTemperatureEntities.length === 0 ? html`
|
|
||||||
<div class="no-results">未找到匹配的实体</div>
|
|
||||||
` : ''}
|
|
||||||
</div>
|
|
||||||
` : ''}
|
|
||||||
</div>
|
|
||||||
<button class="remove-button" @click=${this._removeTemperature} title="移除温度传感器">
|
|
||||||
<ha-icon icon="mdi:close"></ha-icon>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 定时器位置 -->
|
<!-- 定时器位置 -->
|
||||||
${this.config.timer ? html`
|
${this.config.timer ? html`
|
||||||
|
|||||||
Reference in New Issue
Block a user