diff --git a/src/panels/config/zwave/zwave-groups.js b/src/panels/config/zwave/zwave-groups.js index 92246f440c..0be7b41663 100644 --- a/src/panels/config/zwave/zwave-groups.js +++ b/src/panels/config/zwave/zwave-groups.js @@ -108,6 +108,16 @@ class ZwaveGroups extends PolymerElement { Remove From Group + @@ -165,6 +175,16 @@ class ZwaveGroups extends PolymerElement { type: String, value: "", }, + + _removeBroadcastNodeServiceData: { + type: String, + value: "", + }, + + _isBroadcastNodeInGroup: { + type: Boolean, + value: false, + }, }; } @@ -201,6 +221,7 @@ class ZwaveGroups extends PolymerElement { _computeOtherGroupNodes(selectedGroup) { if (selectedGroup === -1) return -1; + this.setProperties({ _isBroadcastNodeInGroup: false }); const associations = Object.values( this.groups[selectedGroup].value.association_instances ); @@ -212,6 +233,17 @@ class ZwaveGroups extends PolymerElement { const id = assoc[0]; const instance = assoc[1]; const node = this.nodes.find((n) => n.attributes.node_id === id); + if (id === 255) { + this.setProperties({ + _isBroadcastNodeInGroup: true, + _removeBroadcastNodeServiceData: { + node_id: this.nodes[this.selectedNode].attributes.node_id, + association: "remove", + target_node_id: 255, + group: this.groups[selectedGroup].key, + }, + }); + } if (!node) { return `Unknown Node (${id}: (${instance} ? ${id}.${instance} : ${id}))`; } @@ -288,6 +320,7 @@ class ZwaveGroups extends PolymerElement { _otherGroupNodes: Object.values( groupData[this._selectedGroup].value.associations ), + _isBroadcastNodeInGroup: false, }); const oldGroup = this._selectedGroup; this.setProperties({ _selectedGroup: -1 });