4 #include "../nextion_component.h" 5 #include "../nextion_base.h" 9 class NextionBinarySensor;
21 void process_touch(uint8_t page_id, uint8_t component_id,
bool state)
override;
30 void set_state(
bool state,
bool publish,
bool send_to_nextion)
override;
35 this->
set_state(state_value != 0, publish, send_to_nextion);
void update_component() override
This class simplifies creating components that periodically check a state.
NextionBinarySensor(NextionBase *nextion)
void set_state_from_int(int state_value, bool publish, bool send_to_nextion) override
NextionQueueType get_queue_type() override
void process_bool(const std::string &variable_name, bool state) override
bool state
The current reported state of the binary sensor.
void set_state_from_string(const std::string &state_value, bool publish, bool send_to_nextion) override
void process_touch(uint8_t page_id, uint8_t component_id, bool state) override
void set_page_id(uint8_t page_id)
void set_component_id(uint8_t component_id)
void set_state(bool state) override
Implementation of SPI Controller mode.
void set_state(bool state, bool publish) override
void send_state_to_nextion() override