Эх сурвалжийг харах

intertechno-cc1101 command: fix lib invocation on --turn-off/-0

Fabian Peter Hammerle 4 жил өмнө
parent
commit
dd38ea92e6

+ 2 - 2
intertechno_cc1101/_cli.py

@@ -47,5 +47,5 @@ def _main():
     remote_control = intertechno_cc1101.RemoteControl(address=args.address)
     if args.turn_on:
         remote_control.turn_on(button_index=args.button_index)
-    else:
-        remote_control.turn_on(button_index=args.button_index)
+    elif args.turn_off:
+        remote_control.turn_off(button_index=args.button_index)