42 SUB_SWITCH(sensor_active)
43 SUB_SWITCH(turn_on_led)
44 SUB_SWITCH(presence_via_uart)
45 SUB_SWITCH(start_after_boot)
51 void set_active(
bool active) {
54 if (this->sensor_active_switch_ !=
nullptr)
55 this->sensor_active_switch_->publish_state(active);
60 bool is_active() {
return active_; }
62 void set_led_active(
bool active) {
65 if (this->turn_on_led_switch_ !=
nullptr)
66 this->turn_on_led_switch_->publish_state(active);
73 void set_uart_presence_active(
bool active) {
76 if (this->presence_via_uart_switch_ !=
nullptr)
77 this->presence_via_uart_switch_->publish_state(active);
82 void set_start_after_boot(
bool start) {
85 if (this->start_after_boot_switch_ !=
nullptr)
86 this->start_after_boot_switch_->publish_state(start);
91#ifdef USE_BINARY_SENSOR
97 int8_t enqueue(std::unique_ptr<Command> cmd);
100#ifdef USE_BINARY_SENSOR