+ >
+ ${
+ this._computeCanToggle(stateObj.attributes.entity_id)
+ ? html`
+
+ `
+ : html`
+
+ ${
+ computeStateDisplay(
+ this.localize,
+ stateObj,
+ this.hass.language
+ )
+ }
+
+ `
+ }
+
+ `;
+ }
+
+ private _computeCanToggle(entityIds): boolean {
+ return entityIds.some((entityId) =>
+ DOMAINS_TOGGLE.has(entityId.split(".", 1)[0])
+ );
+ }
+}
+
+declare global {
+ interface HTMLElementTagNameMap {
+ "hui-group-entity-row": HuiGroupEntityRow;
+ }
+}
+
+customElements.define("hui-group-entity-row", HuiGroupEntityRow);