Lights

Related Config File Sections
lights:
light_settings:
light_player:

In MPF 0.50 all LEDs, matrix lights and GIs are configured as lights:. See “Lights” versus “LEDs” (Some LEDs are lights?!?) for details.

There are multiple types of lights (read those for specific details):

../../_images/lights_vs_leds.jpg

This is an example of for a light:

lights:
  my_led:
    number: 7

For WS2812 LEDs use type: grb (WS2811 does not need this):

lights:
  my_ws2812_led:
    number: 23
    type: grb

You can also map individual color channels:

lights:
  rgb_led:
    type: rgb
    channels:
      red:
        number: 9-29
      green:
        number: 9-30
      blue:
        number: 9-31
      white:
        number: 9-32

If your light is connected to a driver use this example:

coils:
  light_connected_to_a_driver:
    number: 42           # number depends on your platform
    allow_enable: True        # this will allow 100% enable without pwm

lights:
  light_on_a_driver:
    number: light_connected_to_a_driver       # map this light to a driver
    platform: drivers

Monitorable Properties

For dynamic values and conditional events, the prefix for lights is device.lights.<name>.

brightness
The numeric value of the brightness of this light, from 0-255.
color
The current color.