1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-28 13:38:17 +00:00
Samuel Sieb 6839de69c1
add uart button (#5540)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2023-10-18 07:30:32 +13:00

18 lines
425 B
C++

#include "uart_button.h"
#include "esphome/core/log.h"
namespace esphome {
namespace uart {
static const char *const TAG = "uart.button";
void UARTButton::press_action() {
ESP_LOGD(TAG, "'%s': Sending data...", this->get_name().c_str());
this->write_array(this->data_.data(), this->data_.size());
}
void UARTButton::dump_config() { LOG_BUTTON("", "UART Button", this); }
} // namespace uart
} // namespace esphome