ESPHome 2026.3.0-dev
Loading...
Searching...
No Matches
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
7namespace esphome::libretiny {
8
9static const char *const TAG = "lt.component";
10
12 ESP_LOGCONFIG(TAG,
13 "LibreTiny:\n"
14 " Version: %s\n"
15 " Loglevel: %u",
16 LT_BANNER_STR + 10, LT_LOGLEVEL);
17#if defined(__OPTIMIZE_SIZE__) && __OPTIMIZE_LEVEL__ > 0 && __OPTIMIZE_LEVEL__ <= 3
18 ESP_LOGCONFIG(TAG, " Optimization: -Os, SDK: -O" STRINGIFY_MACRO(__OPTIMIZE_LEVEL__));
19#endif
20
21#ifdef USE_TEXT_SENSOR
22 if (this->version_ != nullptr) {
23 this->version_->publish_state(LT_BANNER_STR + 10);
24 }
25#endif // USE_TEXT_SENSOR
26}
27
29
30} // namespace esphome::libretiny
31
32#endif // USE_LIBRETINY
text_sensor::TextSensor * version_
float get_setup_priority() const override
void publish_state(const std::string &state)
constexpr float LATE
For components that should be initialized at the very end of the setup process.
Definition component.h:45