mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-10-22 14:01:20 +00:00
Improve group support. #15
This commit is contained in:
1 parent
ecf64c8058
commit
0fe3a9b45c
1 file changed
+1
-5
@@ -11,10 +11,6 @@ class Groups {
|
||||
this.publishDeviceState = publishDeviceState;
|
||||
}
|
||||
|
||||
stop() {
|
||||
this.queue.stop();
|
||||
}
|
||||
|
||||
onMQTTConnected() {
|
||||
this.mqtt.subscribe(`${settings.get().mqtt.base_topic}/bridge/groups/+/remove`);
|
||||
this.mqtt.subscribe(`${settings.get().mqtt.base_topic}/bridge/groups/+/add`);
|
||||
@@ -62,7 +58,7 @@ class Groups {
|
||||
// Send command to the device.
|
||||
let payload = null;
|
||||
if (topic.type === 'add') {
|
||||
payload = {groupid: groupID, groupname: topic.friendly_name};
|
||||
payload = {groupid: groupID, groupname: ''};
|
||||
} else if (topic.type === 'remove') {
|
||||
payload = {groupid: groupID};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user