API Reference
adafruit_lifx
A CircuitPython/Python library for communicating with the LIFX HTTP Remote API.
Author(s): Brent Rubell for Adafruit Industries
Implementation Notes
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
or:
- Adafruit_requests library:
- class adafruit_lifx.LIFX(wifi_manager: HTTPProtocol, lifx_token: str)
HTTP Interface for interacting with the LIFX API
- Parameters:
wifi_manager (wifi_manager) – WiFiManager or Session
lifx_token (str) – LIFX API token (https://api.developer.lifx.com/docs/authentication)
- effects_off(selector: str, power_off: bool = False) str
Turns off any running effects on the selected device.
- move_effect(selector: str, move_direction: str, period: float, power_on: bool) str
Performs a linear move effect on a light, or lights.
- set_brightness(selector: str, brightness: float) str
Sets the state of the lights within the selector.
- set_color(selector: str, **kwargs) str
Sets the state of the light’s color within the selector. Valid keyword arguments: https://api.developer.lifx.com/docs/set-state
- Parameters:
selector (str) – Selector to control which lights are requested.