mirror of
https://github.com/esphome/esphome.git
synced 2026-09-11 15:27:33 +00:00
Add SerialProxyTap, a protocol-agnostic observer interface that lets a companion component watch the bytes flowing through a proxied port and inject bytes of its own (protocol acknowledgements, for example) without owning the port. The tap machinery is compiled in only when a tap component defines USE_SERIAL_PROXY_TAP, so ports without one pay nothing. Add a per-port mode (RAW or PROTOCOL) with a matching API message so clients control whether the tap is active. The mode belongs to the client session: it resets to RAW whenever the subscriber disconnects, and RAW is guaranteed inert so a client can flash firmware through the port without protocol bytes being injected. Bumps the API minor version to 17. Co-Authored-By: puddly <32534428+puddly@users.noreply.github.com>