From: Roman Bazalevsky Date: Tue, 14 Jan 2020 06:49:08 +0000 (+0300) Subject: Исправлена обработка команды POWER для совместимости с Tasmota. X-Git-Url: https://git.rvb.name/mqtt-noolite.git/commitdiff_plain/7f30da8a3df100711cdb33bed2866ffe1410f878 Исправлена обработка команды POWER для совместимости с Tasmota. --- diff --git a/nmd/nl_mqtt.py b/nmd/nl_mqtt.py index ab7b997..fc6ddec 100644 --- a/nmd/nl_mqtt.py +++ b/nmd/nl_mqtt.py @@ -100,7 +100,7 @@ class MqttDriver(metaclass=Singleton): if command == "power": payload = payload.decode('utf-8').lower() print( "command: POWER " + payload ) - if payload == "off": + if payload == "off" or payload == "0": mtrf_command["cmd"] = 0 else: mtrf_command["cmd"] = 2