7 static const char *
const TAG =
"uart.switch";
11 const uint32_t now =
millis();
20 if (state && !this->
data_on_.empty()) {
21 ESP_LOGD(TAG,
"'%s': Sending on data...", this->
get_name().c_str());
25 ESP_LOGD(TAG,
"'%s': Sending off data...", this->
get_name().c_str());
54 LOG_SWITCH(
"",
"UART Switch",
this);
56 ESP_LOGCONFIG(TAG,
" Send Every: %" PRIu32, this->
send_every_);
void write_array(const uint8_t *data, size_t len)
std::vector< uint8_t > data_on_
void write_command_(bool state)
uint32_t IRAM_ATTR HOT millis()
std::vector< uint8_t > data_off_
void dump_config() override
uint32_t last_transmission_
Implementation of SPI Controller mode.
void write_state(bool state) override
void publish_state(bool state)
Publish a state to the front-end from the back-end.
bool state
The current reported state of the binary sensor.
const StringRef & get_name() const