def _set_group_bri_hue_sat_trans(bridge, group_id, bri, hue, sat, trans):
    g = Group(bridge, group_id)
    g.transitiontime = trans
    g.on = True
    g.brightness = bri
    g.hue = hue
    g.saturation = sat
    def cycle():
        g = Group(b, room_group_id)
        i = 0
        lights = g.lights

        while lock_is_valid(lock):
            i += 1
            if (i >= len(lights)): i = 0

            g.transitiontime = default_transitiontime

            for j, light in enumerate(lights):
                light.on = i == j
            
            sleep(1)
    def cycle():
        g = Group(b, room_group_id)
        i = 0
        lights = g.lights

        while lock_is_valid(lock):
            i += 1
            if (i > 1): i = 0

            g.transitiontime = default_transitiontime

            for j, light in enumerate(lights):
                light.on = True
                light.transitiontime = 0
                light.brightness = max_bri
                light.saturation = max_sat

                if j % 2 == i:
                    light.hue = red_hue
                else:
                    light.hue = blue_hue
                
            sleep(0.8)
def _set_group_bri(bridge, group_id, bri):
    g = Group(bridge, group_id)
    g.transitiontime = default_transitiontime
    g.on = True
    g.brightness = bri