ESPHome
2026.3.0-dev
Loading...
Searching...
No Matches
esphome
components
libretiny
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::libretiny
{
8
9
static
const
char
*
const
TAG =
"lt.component"
;
10
11
void
LTComponent::dump_config
() {
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
28
float
LTComponent::get_setup_priority
()
const
{
return
setup_priority::LATE
; }
29
30
}
// namespace esphome::libretiny
31
32
#endif
// USE_LIBRETINY
esphome::libretiny::LTComponent::version_
text_sensor::TextSensor * version_
Definition
lt_component.h:28
esphome::libretiny::LTComponent::dump_config
void dump_config() override
Definition
lt_component.cpp:11
esphome::libretiny::LTComponent::get_setup_priority
float get_setup_priority() const override
Definition
lt_component.cpp:28
esphome::text_sensor::TextSensor::publish_state
void publish_state(const std::string &state)
Definition
text_sensor.cpp:21
log.h
lt_component.h
esphome::libretiny
Definition
core.h:7
esphome::setup_priority::LATE
constexpr float LATE
For components that should be initialized at the very end of the setup process.
Definition
component.h:45
Generated by
1.12.0