mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-08-28 13:34:24 +00:00
Fix topicPrefix parsing. #387
This commit is contained in:
+1
-1
@@ -479,7 +479,7 @@ class Controller {
|
||||
|
||||
handleMQTTMessageDevice(topic, message, withPrefix) {
|
||||
const friendlyName = topic.split('/').slice(withPrefix ? -3 : -2)[0];
|
||||
const topicPrefix = withPrefix ? topic.split('/').slice(-3)[0] : '';
|
||||
const topicPrefix = withPrefix ? topic.split('/').slice(-2)[0] : '';
|
||||
|
||||
// Map friendlyName to deviceID.
|
||||
const deviceID = settings.getIDByFriendlyName(friendlyName);
|
||||
|
||||
Reference in New Issue
Block a user