def write_config(ip, mac, single, double, long, touch):
    """Write the current configuration of a myStrom button."""
    click.echo("Write configuration to device %s" % ip)
    data = {
        'single': single,
        'double': double,
        'long': long,
        'touch': touch,
    }
    request = requests.post(
        'http://{}/{}/{}/'.format(ip, URI, mac), data=data, timeout=TIMEOUT)

    if request.status_code == 200:
        click.echo("Configuration of %s set" % mac)
def write_config ( ip , mac , single , double , long , touch ) : click . echo ( "Write configuration to device %s" % ip ) data = { 'single' : single , 'double' : double , 'long' : long , 'touch' : touch , } request = requests . post ( 'http://{}/{}/{}/' . format ( ip , URI , mac ) , data = data , timeout = TIMEOUT ) if request . status_code == 200 : click . echo ( "Configuration of %s set" % mac )
Write the current configuration of a myStrom button.