[neopixelbus] Fix ESP8266 compilation by enabling Serial/Serial1 for NeoPixelBus library (#13027)

This commit is contained in:
J. Nick Koston
2026-01-06 08:38:39 -10:00
committed by GitHub
parent d6c2dd3c26
commit 8eb28a7724

View File

@@ -194,6 +194,14 @@ CONFIG_SCHEMA = cv.All(
async def to_code(config):
if CORE.is_esp8266:
# NeoPixelBus library unconditionally includes NeoEsp8266UartMethod.h
# which references Serial and Serial1, so we must enable both
from esphome.components.esp8266.const import enable_serial, enable_serial1
enable_serial()
enable_serial1()
has_white = "W" in config[CONF_TYPE]
method = config[CONF_METHOD]