Decode DP127 as 48 bytes (4 alarms), plus DP128, DP107 and DP126, from Tuya's data model. Add day switches, alarm and sunset controls, a knock sensor on PA18, display schedule, bedtime fade, radio timer and grouped web UI. Pin LibreTiny v1.14.0 for the OTA restart fix. Ship the patched UART as an external component so a server needs only a short YAML. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
570 B
Python
21 lines
570 B
Python
from esphome.components.packet_transport import (
|
|
PacketTransport,
|
|
new_packet_transport,
|
|
transport_schema,
|
|
)
|
|
from esphome.cpp_types import PollingComponent
|
|
|
|
from .. import UART_DEVICE_SCHEMA, register_uart_device, uart_ns
|
|
|
|
CODEOWNERS = ["@clydebarrow"]
|
|
DEPENDENCIES = ["uart"]
|
|
|
|
UARTTransport = uart_ns.class_("UARTTransport", PacketTransport, PollingComponent)
|
|
|
|
CONFIG_SCHEMA = transport_schema(UARTTransport).extend(UART_DEVICE_SCHEMA)
|
|
|
|
|
|
async def to_code(config):
|
|
var, _ = await new_packet_transport(config)
|
|
await register_uart_device(var, config)
|