mirror of
https://github.com/esphome/esphome.git
synced 2026-01-08 19:20:51 -07:00
[neopixelbus] Fix ESP8266 compilation by enabling Serial/Serial1 for NeoPixelBus library (#13027)
This commit is contained in:
@@ -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]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user