From 9f30bdce1b62c00a4a4ce4000a6e1db784db6775 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Lov=C3=A9n?= Date: Sat, 12 Jan 2019 21:13:00 +0100 Subject: [PATCH] Don't overwrite configuration --- fold-entity-row.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fold-entity-row.js b/fold-entity-row.js index 0f70948..1ef768d 100644 --- a/fold-entity-row.js +++ b/fold-entity-row.js @@ -112,10 +112,11 @@ class FoldEntityRow extends LitElement { this._head = this._renderHead(config.head); const head = (typeof config.head === "string") ? config.head : config.head.entity; + let items = config.items if (head && head.split('.')[0] === "group") - config.items = window.cardTools.hass().states[head].attributes.entity_id; + items = window.cardTools.hass().states[head].attributes.entity_id; - this._entities = config.items.map((e) => this._renderItem(e, config.group_config)); + this._entities = items.map((e) => this._renderItem(e, config.group_config)); } set hass(hass) {