4 #include "../nextion_component.h" 5 #include "../nextion_base.h" 17 void process_bool(
const std::string &variable_name,
bool on)
override;
21 void set_state(
bool state,
bool publish,
bool send_to_nextion)
override;
27 this->
set_state(state_value != 0, publish, send_to_nextion);
Base class for all switches.
void set_state(bool state) override
void set_state_from_string(const std::string &state_value, bool publish, bool send_to_nextion) override
This class simplifies creating components that periodically check a state.
void send_state_to_nextion() override
void set_state(bool state, bool publish) override
void write_state(bool state) override
void update_component() override
NextionQueueType get_queue_type() override
Implementation of SPI Controller mode.
NextionSwitch(NextionBase *nextion)
void process_bool(const std::string &variable_name, bool on) override
bool state
The current reported state of the binary sensor.
void set_state_from_int(int state_value, bool publish, bool send_to_nextion) override