Update the patched UART component to ESPHome 2026.11.0

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>
This commit is contained in:
mangavalkandClaude Opus 5.5 committed 2026-11-19 00:31:45 +01:00
1 parent bcc6b3a42b
commit 1457e25d98
39 files changed
+907 -304

No files matched your search

+12 -7
View File
@@ -5,7 +5,6 @@
#include "esphome/components/switch/switch.h"
#include <cinttypes>
#include <vector>
namespace esphome::uart {
@@ -13,10 +12,14 @@ class UARTSwitch final : public switch_::Switch, public UARTDevice, public Compo
public:
void loop() override;
void set_data_on(std::vector<uint8_t> &&data) { this->data_on_ = std::move(data); }
void set_data_on(std::initializer_list<uint8_t> data) { this->data_on_ = std::vector<uint8_t>(data); }
void set_data_off(std::vector<uint8_t> &&data) { this->data_off_ = std::move(data); }
void set_data_off(std::initializer_list<uint8_t> data) { this->data_off_ = std::vector<uint8_t>(data); }
void set_data_on(const uint8_t *data, uint16_t len) {
this->data_on_ = data;
this->data_on_len_ = len;
}
void set_data_off(const uint8_t *data, uint16_t len) {
this->data_off_ = data;
this->data_off_len_ = len;
}
void set_send_every(uint32_t send_every) { this->send_every_ = send_every; }
void set_single_state(bool single) { this->single_state_ = single; }
@@ -25,8 +28,10 @@ class UARTSwitch final : public switch_::Switch, public UARTDevice, public Compo
protected:
void write_command_(bool state);
void write_state(bool state) override;
std::vector<uint8_t> data_on_;
std::vector<uint8_t> data_off_;
const uint8_t *data_on_{nullptr};
const uint8_t *data_off_{nullptr};
uint16_t data_on_len_{0};
uint16_t data_off_len_{0};
bool single_state_{false};
uint32_t send_every_;
uint32_t last_transmission_;