Compare commits

...

2 Commits

Author SHA1 Message Date
Petar Petrov
732b405223 Update src/panels/lovelace/card-features/hui-area-controls-card-feature.ts
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2025-09-10 15:29:38 +03:00
Petar Petrov
a6e2befcb7 Use entity icon in area card if there is only 1 entity 2025-09-08 14:42:53 +03:00

View File

@@ -273,12 +273,17 @@ class HuiAreaControlsCardFeature
.control=${control}
@click=${this._handleButtonTap}
>
<ha-domain-icon
.hass=${this.hass}
.domain=${domain}
.deviceClass=${deviceClass}
.state=${groupState}
></ha-domain-icon>
${entities.length === 1
? html`<ha-state-icon
.stateObj=${entities[0]}
.hass=${this.hass}
></ha-state-icon>`
: html`<ha-domain-icon
.hass=${this.hass}
.domain=${domain}
.deviceClass=${deviceClass}
.state=${groupState}
></ha-domain-icon>`}
</ha-control-button>
`;
})}