Prechádzať zdrojové kódy

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

Fabian Peter Hammerle 3 rokov pred
rodič
commit
dd38ea92e6
1 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 2 2
      intertechno_cc1101/_cli.py

+ 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)