From 4e86cf01b8219347484fbd6c352cb79375dfdfe0 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Fri, 25 Jan 2019 16:39:33 +0100 Subject: [PATCH] Add group to domains that can be toggled (#2555) * Add group to domains that can be toggled * Group should call homeassistant.turn_on/turn_off * entity id is not a attribute * Oops... --- src/common/const.ts | 1 + src/panels/lovelace/entity-rows/hui-group-entity-row.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/const.ts b/src/common/const.ts index b422818aab..ed50e1133e 100644 --- a/src/common/const.ts +++ b/src/common/const.ts @@ -77,6 +77,7 @@ export const DOMAINS_TOGGLE = new Set([ "input_boolean", "light", "switch", + "group", ]); /** Temperature units. */ diff --git a/src/panels/lovelace/entity-rows/hui-group-entity-row.ts b/src/panels/lovelace/entity-rows/hui-group-entity-row.ts index f5a56e1c5e..5246b28090 100644 --- a/src/panels/lovelace/entity-rows/hui-group-entity-row.ts +++ b/src/panels/lovelace/entity-rows/hui-group-entity-row.ts @@ -52,7 +52,7 @@ class HuiGroupEntityRow extends hassLocalizeLitMixin(LitElement) return html` ${ - this._computeCanToggle(stateObj.attributes.entity_id) + this._computeCanToggle(stateObj.entity_id) ? html`