ColorGroup

ColorGroups allow dimming and setting a color, but have no real white light.

class huegely.groups.ColorGroup(bridge, device_id, name=None, transition_time=None)[source]

Bases: huegely.features.Dimmer, huegely.features.ColorController, huegely.groups.Group

alert(alert=None)

Returns the current alert value if called without alert argument, otherwise sets and returns the new alert.

The only currently supported alerts are ‘none’ and ‘select’.

Note that alerts currently seem to be broken, or at least weird, in the hue api. Setting a select alert will blink a light once, but the alert state will stay on “select” until manually reset.

brighter(step=25, transition_time=None)

Makes the light(s) gradually brighter. Turns light on if necessary.

Returns new brightness value.

brightness(brightness=None, transition_time=None)

Returns the current brightness level if called without brightness argument, otherwise sets and returns the new value.

The valid range for brightness values is 0 - 254, passed-in values are clamped to that range.

color_mode()

Returns the current color_mode value (xy or ct).

Note that this has only been tested on an ExtendedColorLight, because I don’t have others. It might not work on ColorLights or ColorTemperatureLights.

coordinates(coordinates=None, transition_time=None)

Returns the current coolor coordinates value if called without coordinates argument, otherwise sets and returns the new value.

coordinates is expected to be in the format of [x (float), y (float)].

The valid range for each coordinate is 0 - 1, passed-in values are clamped to that range.

Note that each lamp’s color space is different and will choose the color coordinate they can reproduce closest to the requested value. See http://www.developers.meethue.com/documentation/core-concepts for details.

darker(step=25, transition_time=None)

Makes the light(s) gradually darker. Turns off if the brightness goes down to 0.

Returns the new brightness value.

effect(effect=None)

Returns the current effect value if called without effect argument, otherwise sets and returns the new effect.

The only currently supported effects are ‘none’ and ‘colorloop’.

group_type()

Get the type of group (light group or room)

hue(hue=None, transition_time=None)

Returns the current hue value if called without hue argument, otherwise sets and returns the new value.

The valid range for hues is 0 - 65534, passed-in values are cycled over that range. I.e. hue(65535) (red) is equal to hue(0) (also red).

is_on()

Returns True if the light(s) is on, False otherwise.

lights()

Returns all lights that belong to this group.

name(name=None)

Gets or sets the current name of the group. If called without name argument, returns the current group name.

If called with a name argument, sets and returns the new name of the group.

off(transition_time=None)

Turns light(s) off. Returns new state (False).

on(transition_time=None)

Turns light(s) on. Returns new state (True).

saturation(saturation=None, transition_time=None)

Returns the current saturation value if called without saturation argument, otherwise sets and returns the new value.

The valid range for saturation is 0 - 254, passed-in values are clamped to that range.

state(**state)

Gets or sets state attributes. Call this without any arguments to get the entire state as reported by the Hue bridge. Note that the state reported by groups is unreliable - the values mostly seem to have no relation to the real lights. It is sometimes necessary to get the state though, especially when using the brighter/darker commands.

Pass in any amount of state attributes to update them, e.g. on=True, brighter=50.

Returns a dictionary of successfully updated attributes in the format of {'brightness': 100, 'on': True}

transition_time