Files
esphome-wake-up-light-ii/components/uart/button/uart_button.cpp
T

15 lines
396 B
C++
Raw Normal View History

#include "uart_button.h"
#include "esphome/core/log.h"
namespace esphome::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 esphome::uart