SPI LED Strip Light¶
spi_led_strip light platform drives one or more SPI interfaced RGB LEDs. These LEDs are often used in strips, where
each LED is individually addressable. This component requires an SPI interface to be configured.
This component has been tested with APA102 LEDs and the P9813 LED driver. It should also work with HD107 and SK9822 type LEDs, or any others with a similar interface - SPI, 8 bits per colour and BGR ordering.
# Example configuration entry spi: mosi_pin: GPIO3 clk_pin: GPIO9 light: - platform: spi_led_strip num_leds: 30 color_correct: [80%, 60%, 100%] id: rgb_led name: "RGB LED Strip" data_rate: 1MHz
It is often favourable to calibrate/correct the color produced by an LED strip light as the
perceived intensity of different colors will generally vary. This can be done by using
color_correct to adjust the relative brightness of the RGB components.
name (Required, string): The name of the light.
num_leds (Optional, int): The number of LEDs attached. The default is 1.
effects (Optional, list): A list of light effects to use for this light.
id (Optional, ID): Manually specify the ID used for code generation.
data_rate (Optional): Set the data rate of the SPI interface to the display. One of
All other options from Light.
You may also need to configure an
output GPIO pin to control power to the LEDs, depending on your hardware. The
APA102 and friends do not have a
CS input, and are write-only so the SPI
miso pin should not be specified.