From: Roman Bazalevsky Date: Fri, 5 Jun 2020 17:35:53 +0000 (+0300) Subject: Незначительно причесан код (убраны дублирующиеся строки). X-Git-Url: https://git.rvb.name/mqtt-noolite.git/commitdiff_plain Незначительно причесан код (убраны дублирующиеся строки). --- diff --git a/nmd/nl_mqtt.py b/nmd/nl_mqtt.py index f02018c..d4ce7ae 100644 --- a/nmd/nl_mqtt.py +++ b/nmd/nl_mqtt.py @@ -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: