Skip to content

Commit

Permalink
Merge pull request #141 from Tenzer/short-circuit-on-command
Browse files Browse the repository at this point in the history
Short circuit the "on" command
  • Loading branch information
klattimer authored Dec 5, 2023
2 parents 46cc5d7 + e440eef commit 63e0e50
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions LGTV/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,12 @@ def main():

try:
ws = LGTVRemote(name, **config[name], ssl=args.ssl)

if args.command == "on":
# "on" is special, it doesn't use a websocket connection
ws.on()
return

ws.connect()
ws.execute(args.command, kwargs)
ws.run_forever()
Expand Down

0 comments on commit 63e0e50

Please sign in to comment.