from miio.miioprotocol import MiIOProtocol
from config import SWITCH1_IP, SWITCH1_TOKEN, SWITCH2_IP, SWITCH2_TOKEN
from miio import Device

# from utils.mi import c1_disconnect, c1_connect, c2_connect
#
# if __name__ == '__main__':
#     # m = MiIOProtocol(
#     #     SWITCH1_IP, SWITCH1_TOKEN,
#     # )
#     # r = m.send('get_properties', [{'did': 'MYDID', 'siid': 2, 'piid': 1}])
#     # print(r[0]['value'])
#     c1_connect()
#     c2_connect()

import click


@click.group()
def cli():
    pass

@cli.command()
@click.option('--count', default=1, help='Number of greetings.')
@click.option('--name', prompt='Your name',
              help='The person to greet.')
def con(count, name):
    """Simple program that greets NAME for a total of COUNT times."""
    for x in range(count):
        click.echo(f"Hello {name}!")

@cli.command()
def disconnect():
    click.echo('Dropped the database')
if __name__ == '__main__':
    cli()
