WLED

WLED is a fast and feature-rich implementation of an ESP8266/ESP32 webserver to control NeoPixel LEDs (like WS2812B, WS2811, SK6812, and similar) and SPI based chipsets (like WS2801 and APA102).

Prerequisites

Important

This integration requires a WLED device running WLED 0.14.0 or newer.

You can install the latest version of WLED on your device by going to the WLED web installer or by downloading the latest release from the WLED GitHub releases page.

配置

要将 WLED device 添加到您的 Home Assistant 实例中,请使用此 My 按钮:

WLED 可以被 Home Assistant 自动发现。如果发现了实例, 它将显示为 已发现。您可以立即进行设置。

手动配置步骤

如果没有自动发现,请不要担心!您可以设置一个 手动集成条目:

Lights

This integration集成将 Home Assistant 与您的设备、服务等连接和集成。 [Learn more] adds the WLED device as a light in Home Assistant. Home Assistant treats every segment of the LED strip as a separate light entity实体表示 Home Assistant 中的传感器、执行器或功能。实体用于监控物理属性或控制其他实体。实体通常是设备或服务的一部分。 [Learn more].

Only native supported features of a light in Home Assistant are supported (which includes effects).

Using WLED segments

WLED can split a single LED strip into multiple segments. These segments can be controlled separately in WLED and in Home Assistant as well.

If WLED has 1 segment defined (the default), that one segment controls the whole LED strip. Home Assistant creates a single light entity实体表示 Home Assistant 中的传感器、执行器或功能。实体用于监控物理属性或控制其他实体。实体通常是设备或服务的一部分。 [Learn more] to control the strip.

If WLED has 2 or more segments, each segment gets its own light entity实体表示 Home Assistant 中的传感器、执行器或功能。实体用于监控物理属性或控制其他实体。实体通常是设备或服务的一部分。 [Learn more] in Home Assistant. Additionally, a master light entity实体表示 Home Assistant 中的传感器、执行器或功能。实体用于监控物理属性或控制其他实体。实体通常是设备或服务的一部分。 [Learn more] is created. This master entity实体表示 Home Assistant 中的传感器、执行器或功能。实体用于监控物理属性或控制其他实体。实体通常是设备或服务的一部分。 [Learn more] controls the strip power and overall brightness applied to all segments.

Additionally, select and number entities described below will be created for each segment.

Select entities

This integration集成将 Home Assistant 与您的设备、服务等连接和集成。 [Learn more] provides select entities for the following information from WLED:

  • Playlist
  • Preset
  • Color palette (per segment, disabled by default).

Number entities

This integration集成将 Home Assistant 与您的设备、服务等连接和集成。 [Learn more] provides number entities to control the following, segment-specific settings:

  • Intensity
  • Speed

Sensor entities

This integration集成将 Home Assistant 与您的设备、服务等连接和集成。 [Learn more] provides sensor entities for the following information from WLED:

  • Estimated current (in mA)
  • Uptime (disabled by default)
  • Free memory (in bytes, disabled by default)
  • Wi-Fi Signal Strength (in %, disabled by default)
  • Wi-Fi Signal Strength (RSSI in dBm, disabled by default)
  • Wi-Fi Channel (disabled by default)
  • Wi-Fi BSSID (disabled by default)
  • IP Address

Switches

The integration集成将 Home Assistant 与您的设备、服务等连接和集成。 [Learn more] will also create a number of switch entities.

Nightlight

Toggles the WLED Timer. Can be configured on the WLED itself under Settings > LED Preferences > Timed light.

Sync receive and sync send

Toggles the synchronization between multiple WLED devices. Can be configured on the WLED itself under Settings > Sync Interfaces > WLED Broadcast.

WLED Sync documentation

Firmware updates

The integration集成将 Home Assistant 与您的设备、服务等连接和集成。 [Learn more] has an update entity that provides information on the latest available version of WLED and indicates if a firmware update is available for installation.

The firmware update can be triggered and installed onto your WLED device directly from Home Assistant.

The update entity实体表示 Home Assistant 中的传感器、执行器或功能。实体用于监控物理属性或控制其他实体。实体通常是设备或服务的一部分。 [Learn more] will only provide updates to stable versions, unless you are using a beta version of WLED. In that case, the update entity实体表示 Home Assistant 中的传感器、执行器或功能。实体用于监控物理属性或控制其他实体。实体通常是设备或服务的一部分。 [Learn more] will also provide updates to newer beta versions.

选项

WLED 的选项可以通过用户界面设置,具体步骤如下:

  • 浏览到您的 Home Assistant 实例。
  • 转到 设置 > 设备与服务
  • 如果配置了多个 WLED 实例,请选择您想配置的实例。
  • 选择集成,然后选择 配置
Keep Master Light

Keep the master light, even if there is only 1 segment. This ensures the master light is always there, in case you are automating segments to appear and remove dynamically.

Example automations

Activating random effect

You can automate changing the effect using an action like this:

action: light.turn_on
target:
  entity_id: light.wled
data:
  effect: "{{ state_attr('light.wled', 'effect_list') | random }}"

It is recommended to select an effect that matches the capabilities of your WLED device (e.g., 1D, 2D, or Sound Reactive). You can refer to the WLED effect list to explore available options. Once you identify compatible effects, you can randomize them based on their IDs.

Below is an example of how to select a random effect with an ID between 1 and 117, excluding retired effects:

action: light.turn_on
target:
  entity_id: light.wled
data:
  effect: "{{ state_attr('light.wled', 'effect_list')[1:118] | reject('equalto', 'RSVD') | list | random }}"

Activating random palette

Activating a random palette is very similar to the above random effect, and can be done by selecting a random one from the available palette select entity实体表示 Home Assistant 中的传感器、执行器或功能。实体用于监控物理属性或控制其他实体。实体通常是设备或服务的一部分。 [Learn more].

action: select.select_option
target:
  entity_id: select.wled_palette
data:
  option: "{{ state_attr('select.wled_palette', 'options') | random }}"

Activating a preset

Activating a preset is an easy way to set a WLED light to a specific configuration. Here is an example action to set a WLED light to a preset called My Preset:

- action: light.turn_on
  target:
    entity_id: light.wled
- action: select.select_option
  target:
    entity_id: select.wled_preset
  data:
    option: "My Preset"

Automation using specific palette name

An automation to turn on a WLED light and select a specific palette and set intensity, and speed can be created by first calling the light.turn_on action, then calling the select.select_option action to select the palette, then call the number.set_value action to set the intensity and again to set the speed.

Here is an example of all of these put together into an automation:

- alias: "Turn on WLED rain effect when weather changes to rainy"
  triggers:
    - trigger: state
      entity_id: sensor.weather_condition
      to: "rainy"
  actions:
    - action: light.turn_on
      target:
        entity_id: light.wled
      data:
        effect: "Rain"
    - action: select.select_option
      target:
        entity_id: select.wled_color_palette
      data:
        option: "Breeze"
    - action: number.set_value
      target:
        entity_id: number.wled_intensity
      data:
        value: 200
    - action: number.set_value
      target:
        entity_id: number.wled_speed
      data:
        value: 255