41 SUB_SWITCH(sensor_active)
42 SUB_SWITCH(turn_on_led)
43 SUB_SWITCH(presence_via_uart)
44 SUB_SWITCH(start_after_boot)
50 void set_active(
bool active) {
53 if (this->sensor_active_switch_ !=
nullptr)
54 this->sensor_active_switch_->publish_state(active);
59 bool is_active() {
return active_; }
61 void set_led_active(
bool active) {
64 if (this->turn_on_led_switch_ !=
nullptr)
65 this->turn_on_led_switch_->publish_state(active);
72 void set_uart_presence_active(
bool active) {
75 if (this->presence_via_uart_switch_ !=
nullptr)
76 this->presence_via_uart_switch_->publish_state(active);
81 void set_start_after_boot(
bool start) {
84 if (this->start_after_boot_switch_ !=
nullptr)
85 this->start_after_boot_switch_->publish_state(start);
90#ifdef USE_BINARY_SENSOR
96 int8_t enqueue(std::unique_ptr<Command> cmd);
99#ifdef USE_BINARY_SENSOR