Base Classes¶
These are the bases which all light/group classes are built upon. Each class describes the behaviour of one specific light feature-set, which are mixed and matched in different hue lights.
-
class
huegely.lights.Light(bridge, device_id, name=None, transition_time=None)[source]¶ Abstract base class for all lights. All lights inherit from
Lightand any appropriate feature classes.-
bridge- Instance of huegely.Bridge this light belongs to¶
-
light_id- Identifier for this light in the hue bridge¶
-
-
class
huegely.groups.Group(bridge, device_id, name=None, transition_time=None)[source]¶ -
bridge- Instance of huegely.Bridge this group belongs to¶
-
group_id- Identifier for this group in the hue bridge¶
-
-
class
huegely.features.Dimmer(bridge, device_id, name=None, transition_time=None)[source]¶ Abstract base class for devices that allow dimming (which is all Hue devices currently being sold.)
-
alert(alert=None)[source]¶ 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)[source]¶ Makes the light(s) gradually brighter. Turns light on if necessary.
Returns new brightness value.
-
brightness(brightness=None, transition_time=None)[source]¶ 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.
-
-
class
huegely.features.ColorController(bridge, device_id, name=None, transition_time=None)[source]¶ Abstract base class for colored lights.
-
color_mode()[source]¶ 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)[source]¶ 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.
-
effect(effect=None)[source]¶ 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’.
-