mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-07-02 10:01:37 +00:00
Use base_topic from configuration.yaml.
This commit is contained in:
@@ -116,7 +116,7 @@ function handleMessage(msg) {
|
||||
// Parse the message.
|
||||
const friendlyName = settings.devices[device.ieeeAddr].friendly_name;
|
||||
const payload = parser.parse(msg).toString();
|
||||
const topic = `xiaomi/${friendlyName}/${parser.topic}`;
|
||||
const topic = `${settings.mqtt.base_topic}/${friendlyName}/${parser.topic}`;
|
||||
|
||||
// Send the message.
|
||||
console.log(`MQTT publish, topic: '${topic}', payload: '${payload}'`);
|
||||
|
||||
Reference in New Issue
Block a user