def dance_party_mode()

in s1e1-totally-lit/hue-python/danceparty.py [0:0]


def dance_party_mode(lights_included):
    # Get a random brightness
    bright_val = str(get_rando(BRIGHT_MAX))

    # Get a random color
    color_val = str(get_rando(COLOR_MAX))

    # Create the JSON used to set the state with our random values
    random_on = '{"transitiontime":0, "sat":254, "bri":' + bright_val + ',"hue":' + color_val + '}'

    # Turn each light on with the specified color and then turn it off
    for id in lights_included:
        send_request_to_bridge(id, random_on)

    return