Незначительно причесан код (убраны дублирующиеся строки). master
authorRoman Bazalevsky <rvb@rvb.name>
Fri, 5 Jun 2020 17:35:53 +0000 (20:35 +0300)
committerRoman Bazalevsky <rvb@rvb.name>
Fri, 5 Jun 2020 17:35:53 +0000 (20:35 +0300)
nmd/nl_mqtt.py

index f02018c6b867d97c38f2ec23497faa8fe0bda24f..d4ce7aec82b0c71b705e76f1f85a9c5711871f6d 100644 (file)
@@ -241,10 +241,6 @@ class MqttDriver(metaclass=Singleton):
           message['command'] = 'BRIGHT_UP'
         elif cmd == 4: 
           message['command'] = 'SWITCH'
-        elif cmd == 5: 
-          message['command'] = 'SWITCH'
-        elif cmd == 5: 
-          message['command'] = 'BRIGHT_BACK'
         elif cmd == 5: 
           message['command'] = 'BRIGHT_BACK'
         elif cmd == 6: 
@@ -257,12 +253,12 @@ class MqttDriver(metaclass=Singleton):
           message['command'] = 'UNBIND'
         elif cmd == 10: 
           message['command'] = 'STOP_REG'
-#        elif cmd == 11: 
-#          message['command'] = 'BRIGHTNESS_STEP_DOWN'
-#        elif cmd == 12: 
-#          message['command'] = 'BRIGHTNESS_STEP_UP'
-#        elif cmd == 13: 
-#          message['command'] = 'BRIGHT_REG'
+        elif cmd == 11: 
+          message['command'] = 'BRIGHTNESS_STEP_DOWN'
+        elif cmd == 12: 
+          message['command'] = 'BRIGHTNESS_STEP_UP'
+        elif cmd == 13: 
+          message['command'] = 'BRIGHT_REG'
         elif cmd == 15: 
           message['command'] = 'BIND'
         elif cmd == 16: