ESPHome 2025.5.0
Loading...
Searching...
No Matches
uart_button.h
Go to the documentation of this file.
1#pragma once
2
6
7#include <vector>
8
9namespace esphome {
10namespace uart {
11
12class UARTButton : public button::Button, public UARTDevice, public Component {
13 public:
14 void set_data(const std::vector<uint8_t> &data) { this->data_ = data; }
15
16 void dump_config() override;
17
18 protected:
19 void press_action() override;
20 std::vector<uint8_t> data_;
21};
22
23} // namespace uart
24} // namespace esphome
Base class for all buttons.
Definition button.h:29
void set_data(const std::vector< uint8_t > &data)
Definition uart_button.h:14
std::vector< uint8_t > data_
Definition uart_button.h:20
void press_action() override
void dump_config() override
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7