Browse Source

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

Fabian Peter Hammerle 3 years ago
parent
commit
dd38ea92e6
1 changed files with 2 additions and 2 deletions
  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)