Co-authored-by: J. Nick Koston <nick@koston.org> Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
29 lines
942 B
Python
29 lines
942 B
Python
import esphome.codegen as cg
|
|
from esphome.components import uart
|
|
from esphome.config_helpers import filter_source_files_from_platform
|
|
from esphome.const import PlatformFramework
|
|
|
|
nextion_ns = cg.esphome_ns.namespace("nextion")
|
|
Nextion = nextion_ns.class_("Nextion", cg.PollingComponent, uart.UARTDevice)
|
|
nextion_ref = Nextion.operator("ref")
|
|
|
|
CONF_NEXTION_ID = "nextion_id"
|
|
CONF_PUBLISH_STATE = "publish_state"
|
|
CONF_SEND_TO_NEXTION = "send_to_nextion"
|
|
|
|
FILTER_SOURCE_FILES = filter_source_files_from_platform(
|
|
{
|
|
"nextion_upload_esp32.cpp": {
|
|
PlatformFramework.ESP32_ARDUINO,
|
|
PlatformFramework.ESP32_IDF,
|
|
},
|
|
"nextion_upload_arduino.cpp": {
|
|
PlatformFramework.ESP8266_ARDUINO,
|
|
PlatformFramework.RP2040_ARDUINO,
|
|
PlatformFramework.BK72XX_ARDUINO,
|
|
PlatformFramework.RTL87XX_ARDUINO,
|
|
PlatformFramework.LN882X_ARDUINO,
|
|
},
|
|
}
|
|
)
|