Skip to content
Get started

MIPI SPI Display Brightness

The mipi_spi light platform controls the brightness of a MIPI SPI display by sending a brightness command to the display over SPI. It is a brightness-only light.

This is intended for displays that set their brightness with a command, such as AMOLED panels. Displays with a backlight controlled by a GPIO pin should use a Monochromatic Light instead.

The light can only be used with a display model that has a default brightness, or with the CUSTOM model when the brightness option is set in the display configuration.

# Example configuration entry
display:
- platform: mipi_spi
id: my_display
model: T4-S3
light:
- platform: mipi_spi
display_id: my_display
name: "Display Brightness"
  • display_id (Optional, ID): The ID of the mipi_spi display to control. Automatically set when only one display is configured; required when there is more than one.
  • min_brightness (Optional, int): The brightness value sent to the display when the light is off or at its lowest level. A value from 0 to 255, defaults to 0.
  • max_brightness (Optional, int): The brightness value sent to the display when the light is at full brightness. A value from 0 to 255, defaults to 255. Must be greater than min_brightness.
  • gamma_correct (Optional, float): The gamma correction to apply. Defaults to 1.0, which means no correction.
  • All other options from Light.

The light brightness is scaled into the range min_brightness to max_brightness. When the light is off, min_brightness is sent, so a non-zero value keeps the display visible at a low level.

The brightness option of the display sets the brightness used at startup, before the light restores its state.

Like other lights, this light is off by default when the device starts. With the default min_brightness of 0, the display will be dark after startup until the light is turned on. To have the display visible at startup, use initial_state to turn the light on:

light:
- platform: mipi_spi
display_id: my_display
name: "Display Brightness"
initial_state:
state: on
brightness: 80%

See the Light Component for more options that control the state at startup.