ESPHome 2025.5.0
Loading...
Searching...
No Matches
micronova_text_sensor.cpp
Go to the documentation of this file.
2
3namespace esphome {
4namespace micronova {
5
7 if (value_from_stove == -1) {
8 this->publish_state("unknown");
9 return;
10 }
11
12 switch (this->get_function()) {
14 this->micronova_->set_current_stove_state(value_from_stove);
15 this->publish_state(STOVE_STATES[value_from_stove]);
16 // set the stove switch to on for any value but 0
17 if (value_from_stove != 0 && this->micronova_->get_stove_switch() != nullptr &&
20 } else if (value_from_stove == 0 && this->micronova_->get_stove_switch() != nullptr &&
23 }
24 break;
25 default:
26 break;
27 }
28}
29
30} // namespace micronova
31} // namespace esphome
MicroNovaSwitchListener * get_stove_switch()
Definition micronova.h:141
void set_current_stove_state(uint8_t s)
Definition micronova.h:137
void process_value_from_stove(int value_from_stove) override
void publish_state(const std::string &state)
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7