本章节介绍如何将 Unit NeoHEX 集成至 Home Assistant。
ESP32 RMT LED Strip 组件仅支持 ESP-IDF 框架;Arduino 框架下的灯光组件为 NeoPixelBus Light。自 2026.1.0 版本后,ESPHome 默认框架将变为 ESP-IDF,建议选用 ESP32 RMT LED Strip 作为灯光组件。点击设备卡片中的EDIT,打开 YAML 编辑器。
以 Atom VoiceS3R 作为主控时,其信号线为GPIO2,添加以下灯光配置:
light:
- platform: esp32_rmt_led_strip
rgb_order: GRB
pin: GPIO2
num_leds: 37
chipset: WS2812
name: "Unit NeoHex"
id: neo_hex_light
restore_mode: RESTORE_DEFAULT_OFF
effects:
- random:
name: "Random"
transition_length: 1s
update_interval: 4s
...完成配置并成功烧录固件后,在 Home Assistant 集成中找到 Unit NeoHEX 对应的灯光实体,即可控制灯光。