8 static const char *
const TAG =
"nextion_switch";
16 ESP_LOGD(TAG,
"Processed switch \"%s\" state %s", variable_name.c_str(),
state ?
"ON" :
"OFF");
30 if (send_to_nextion) {
46 ESP_LOGN(TAG,
"Updated switch \"%s\" state %s", this->
variable_name_.c_str(), ONOFF(state));
std::string variable_name_
void update_component_settings() override
void set_state(bool state) override
bool needs_to_send_update_
virtual bool is_updating()
virtual void add_to_get_queue(NextionComponentBase *component)=0
void write_state(bool state) override
Implementation of SPI Controller mode.
virtual void add_no_result_to_queue_with_set(NextionComponentBase *component, int32_t state_value)=0
void publish_state(bool state)
Publish a state to the front-end from the back-end.
void process_bool(const std::string &variable_name, bool on) override
bool state
The current reported state of the binary sensor.