ESPHome 2026.11's tuya component calls uart.new_uart_component(), which the 2026.10.2 copy didn't have, so the build failed. Copy the UART component from 2026.11.0, reapply the PA13/PA14 patch, regenerate the patch file and point the refs at v1.0.6. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
30 lines
775 B
Python
30 lines
775 B
Python
from esphome import automation
|
|
from esphome.components import button, uart
|
|
import esphome.config_validation as cv
|
|
from esphome.const import CONF_DATA, CONF_UART_ID
|
|
from esphome.types import ConfigType
|
|
|
|
from .. import validate_raw_payload
|
|
|
|
CODEOWNERS = ["@ssieb"]
|
|
|
|
DEPENDENCIES = ["uart"]
|
|
|
|
CONFIG_SCHEMA = (
|
|
button.button_schema(button.ApplyButton)
|
|
.extend(
|
|
{
|
|
cv.Required(CONF_DATA): validate_raw_payload,
|
|
}
|
|
)
|
|
.extend(uart.UART_DEVICE_SCHEMA)
|
|
)
|
|
|
|
|
|
async def to_code(config: ConfigType) -> None:
|
|
data = config[CONF_DATA]
|
|
table = automation.progmem_bytes("uart_data", data)
|
|
await button.sub_buttons(config, parent=config[CONF_UART_ID]).create(
|
|
config, None, apply=f"write_array_progmem({table}, {len(data)})"
|
|
)
|