Fix no devices logged when publishing empty message to zigbee2mqtt/bridge/config/devices. #5289

This commit is contained in:
Koen Kanters 2020-12-13 18:12:11 +01:00
parent bc4c74d5b6
commit 026f1bfd1c

View File

@ -177,7 +177,9 @@ class BridgeLegacy extends Extension {
});
if (topic.split('/').pop() == 'get') {
this.mqtt.publish(`bridge/config/devices`, stringify(devices), {});
this.mqtt.publish(
`bridge/config/devices`, stringify(devices), {}, settings.get().mqtt.base_topic, false, false,
);
} else {
this.mqtt.publish('bridge/log', stringify({type: 'devices', message: devices}));
}