10 if (initial.has_value()) {
11 const bool state = initial.value();
12 this->
apply_(state,
false);
30 switch (this->
kind_) {
32 this->
parent_->set_health_mode(state, transmit);
35 this->
parent_->set_quiet_mode(state, transmit);
38 this->
parent_->set_turbo_mode(state, transmit);
void dump_config() override
void apply_(bool state, bool transmit)
void write_state(bool state) override
bool state
The current reported state of the binary sensor.
void publish_state(bool state)
Publish a state to the front-end from the back-end.
optional< bool > get_initial_state_with_restore_mode()
Returns the initial state of the switch, after applying restore mode rules.
@ CLIMATE_MODE_HEAT
The climate device is set to heat to reach the target temperature.
@ CLIMATE_MODE_COOL
The climate device is set to cool to reach the target temperature.
ESPHOME_LOG_TAG(TAG, "haier_tundra.button")