mirror of
https://github.com/esphome/esphome.git
synced 2025-07-24 20:26:35 +00:00
[fastled_clockless, fastled_spi] Add suggested alternate when using IDF (#9784)
This commit is contained in:
parent
fc8c5a7438
commit
cb6acfe24b
@ -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,
|
||||
)
|
||||
|
||||
|
||||
|
@ -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),
|
||||
|
Loading…
x
Reference in New Issue
Block a user