From 3c68d295daec69ab228df5ecb81253e22a394dda Mon Sep 17 00:00:00 2001 From: Teemu R Date: Sun, 12 Jan 2020 20:29:19 +0100 Subject: [PATCH] Remove --ip which was just an alias to --host (#6) --- kasa/cli.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/kasa/cli.py b/kasa/cli.py index 5440ae74..339753d6 100755 --- a/kasa/cli.py +++ b/kasa/cli.py @@ -13,14 +13,6 @@ pass_dev = click.make_pass_decorator(SmartDevice) @click.group(invoke_without_command=True) -@click.option( - "--ip", - envvar="KASA_IP", - required=False, - help="The IP address of the device to connect to. This option " - "is deprecated and will be removed in the future; use --host " - "instead.", -) @click.option( "--host", envvar="KASA_HOST", @@ -45,7 +37,7 @@ pass_dev = click.make_pass_decorator(SmartDevice) @click.option("--strip", default=False, is_flag=True) @click.version_option() @click.pass_context -def cli(ctx, ip, host, alias, target, debug, bulb, plug, strip): +def cli(ctx, host, alias, target, debug, bulb, plug, strip): """A cli tool for controlling TP-Link smart home plugs.""" # noqa if debug: logging.basicConfig(level=logging.DEBUG) @@ -55,9 +47,6 @@ def cli(ctx, ip, host, alias, target, debug, bulb, plug, strip): if ctx.invoked_subcommand == "discover": return - if ip is not None and host is None: - host = ip - if alias is not None and host is None: click.echo("Alias is given, using discovery to find host %s" % alias) host = find_host_from_alias(alias=alias, target=target)