[fastled_clockless, fastled_spi] Add suggested alternate when using IDF (#9784)

This commit is contained in:
Keith Burzinski 2025-07-22 06:53:33 -05:00 committed by Jesse Hills
parent fc8c5a7438
commit cb6acfe24b
No known key found for this signature in database
GPG Key ID: BEAAE804EFD8E83A
2 changed files with 27 additions and 2 deletions

View File

@ -2,7 +2,13 @@ from esphome import pins
import esphome.codegen as cg
from esphome.components import fastled_base
import esphome.config_validation as cv
from esphome.const import CONF_CHIPSET, CONF_NUM_LEDS, CONF_PIN, CONF_RGB_ORDER
from esphome.const import (
CONF_CHIPSET,
CONF_NUM_LEDS,
CONF_PIN,
CONF_RGB_ORDER,
Framework,
)
AUTO_LOAD = ["fastled_base"]
@ -48,13 +54,22 @@ CONFIG_SCHEMA = cv.All(
cv.Required(CONF_PIN): pins.internal_gpio_output_pin_number,
}
),
_validate,
cv.only_with_framework(
frameworks=Framework.ARDUINO,
suggestions={
Framework.ESP_IDF: (
"esp32_rmt_led_strip",
"light/esp32_rmt_led_strip",
)
},
),
cv.require_framework_version(
esp8266_arduino=cv.Version(2, 7, 4),
esp32_arduino=cv.Version(99, 0, 0),
max_version=True,
extra_message="Please see note on documentation for FastLED",
),
_validate,
)

View File

@ -9,6 +9,7 @@ from esphome.const import (
CONF_DATA_RATE,
CONF_NUM_LEDS,
CONF_RGB_ORDER,
Framework,
)
AUTO_LOAD = ["fastled_base"]
@ -33,6 +34,15 @@ CONFIG_SCHEMA = cv.All(
cv.Optional(CONF_DATA_RATE): cv.frequency,
}
),
cv.only_with_framework(
frameworks=Framework.ARDUINO,
suggestions={
Framework.ESP_IDF: (
"spi_led_strip",
"light/spi_led_strip",
)
},
),
cv.require_framework_version(
esp8266_arduino=cv.Version(2, 7, 4),
esp32_arduino=cv.Version(99, 0, 0),