DimmableGroup¶
These are the most basic groups, only supporting dimming with only white light.
-
class
huegely.groups.DimmableGroup(bridge, device_id, name=None, transition_time=None)[source]¶ Bases:
huegely.features.Dimmer,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.
-
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.
-
group_type()¶ Get the type of group (light group or room)
-
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).
-
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¶
-