A CircuitPython/Python library for communicating with the LIFX HTTP Remote API.
- Author(s): Brent Rubell for Adafruit Industries
Software and Dependencies:
- Adafruit CircuitPython firmware for the supported boards: https://github.com/adafruit/circuitpython/releases
- Adafruit ESP32SPI or ESP_ATcontrol library:
- https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI https://github.com/adafruit/Adafruit_CircuitPython_ESP_ATcontrol
HTTP Interface for interacting with the LIFX API
Turns off any running effects on the selected device. :param dict selector: Selector to control which lights are requested. :param bool power_off: If true, the devices will also be turned off.
Enumerates all the lights associated with the LIFX Cloud Account
move_effect(selector, move_direction, period, power_on)¶
Performs a linear move effect on a light, or lights. :param str move_direction: Move direction, forward or backward. :param double period: Time in second per effect cycle. :param bool power_on: Turn on a light before performing the move.
Sets the state of the lights within the selector. :param dict selector: Selector to control which lights are requested. :param double brightness: Brightness level of the light, from 0.0 to 1.0.
Sets the state of the light’s color within the selector. Valid arguments: https://api.developer.lifx.com/docs/set-state
toggle_light(selector, all_lights=False, duration=0)¶
Toggles current state of LIFX light(s). :param dict selector: Selector to control which lights are requested. :param bool all: Toggle all lights at once. Defaults to false. :param double duration: Time (in seconds) to spend performing a toggle. Defaults to 0.