def setup(): """ Setup connection to Bridge """ ip_address = bridge.discover() bridge.connect(ip_address) config = configuration.create(ip_address) message = 'Config created for IP address: {0}'.format(config['ip_address']) click.echo(message)
def get_bridge(): config = configuration.get() return bridge.connect(config['ip_address'])