ESPHome  2024.10.2
lt_component.cpp
Go to the documentation of this file.
1 #include "lt_component.h"
2 
3 #ifdef USE_LIBRETINY
4 
5 #include "esphome/core/log.h"
6 
7 namespace esphome {
8 namespace libretiny {
9 
10 static const char *const TAG = "lt.component";
11 
13  ESP_LOGCONFIG(TAG, "LibreTiny:");
14  ESP_LOGCONFIG(TAG, " Version: %s", LT_BANNER_STR + 10);
15  ESP_LOGCONFIG(TAG, " Loglevel: %u", LT_LOGLEVEL);
16 
17 #ifdef USE_TEXT_SENSOR
18  if (this->version_ != nullptr) {
19  this->version_->publish_state(LT_BANNER_STR + 10);
20  }
21 #endif // USE_TEXT_SENSOR
22 }
23 
25 
26 } // namespace libretiny
27 } // namespace esphome
28 
29 #endif // USE_LIBRETINY
const float LATE
For components that should be initialized at the very end of the setup process.
Definition: component.cpp:28
void publish_state(const std::string &state)
Definition: text_sensor.cpp:9
float get_setup_priority() const override
text_sensor::TextSensor * version_
Definition: lt_component.h:29
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7