Generate ARDUINO_VERSION_CODE in Python code (#3101)

Co-authored-by: Otto winter <otto@otto-winter.com>
This commit is contained in:
Oxan van Leeuwen
2022-01-24 10:34:34 +01:00
committed by GitHub
parent f2d677d51a
commit cdda648360
15 changed files with 71 additions and 98 deletions
+4
View File
@@ -169,6 +169,10 @@ def _validate_method(value):
CONFIG_SCHEMA = cv.All(
cv.only_with_arduino,
cv.require_framework_version(
esp8266_arduino=cv.Version(2, 4, 0),
esp32_arduino=cv.Version(0, 0, 0),
),
light.ADDRESSABLE_LIGHT_SCHEMA.extend(
{
cv.GenerateID(CONF_OUTPUT_ID): cv.declare_id(NeoPixelBusLightOutputBase),
@@ -9,10 +9,6 @@
#include "esphome/components/light/light_output.h"
#include "esphome/components/light/addressable_light.h"
#if defined(USE_ESP8266) && ARDUINO_VERSION_CODE < VERSION_CODE(2, 4, 0)
#error The NeoPixelBus library requires at least arduino_version 2.4.x
#endif
#include "NeoPixelBus.h"
namespace esphome {