Add SO89 to LwDecode.be

This commit is contained in:
Theo Arends 2025-07-26 16:54:56 +02:00
parent 0719f9811d
commit 323c942337

View File

@ -58,7 +58,11 @@ class lwdecode_cls
if tasmota.get_option(83) == 0 # SetOption83 - Remove LwDecoded form JSON message (1)
mqttData = {"LwDecoded":{deviceName:decoded}}
end
mqtt.publish(self.topic, json.dump(mqttData))
var topic = self.topic
if tasmota.get_option(89) == 1 # SetOption89 - Distinct MQTT topics per device (1)
topic = self.topic + "/" + deviceData[deviceName]['DevEUIh'] + deviceData[deviceName]['DevEUIl']
end
mqtt.publish(topic, json.dump(mqttData))
tasmota.global.restart_flag = 0 # Signal LwDecoded successful (default state)
end