ESPHome  2024.5.4
micronova_text_sensor.cpp
Go to the documentation of this file.
2 
3 namespace esphome {
4 namespace 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 publish_state(const std::string &state)
Definition: text_sensor.cpp:9
void process_value_from_stove(int value_from_stove) override
void set_current_stove_state(uint8_t s)
Definition: micronova.h:137
This is a workaround until we can figure out a way to get the tflite-micro idf component code availab...
Definition: a01nyub.cpp:7