ESPHome
2026.3.0-dev
Loading...
Searching...
No Matches
esphome
components
libretiny
lt_component.h
Go to the documentation of this file.
1
#pragma once
2
3
#ifdef USE_LIBRETINY
4
5
#include "
esphome/core/component.h
"
6
#include "
esphome/core/defines.h
"
7
8
#ifdef USE_SENSOR
9
#include "
esphome/components/sensor/sensor.h
"
10
#endif
11
#ifdef USE_TEXT_SENSOR
12
#include "
esphome/components/text_sensor/text_sensor.h
"
13
#endif
14
15
namespace
esphome::libretiny
{
16
17
class
LTComponent
:
public
Component
{
18
public
:
19
float
get_setup_priority
()
const override
;
20
void
dump_config
()
override
;
21
22
#ifdef USE_TEXT_SENSOR
23
void
set_version_sensor
(
text_sensor::TextSensor
*version) {
version_
= version; }
24
#endif
// USE_TEXT_SENSOR
25
26
protected
:
27
#ifdef USE_TEXT_SENSOR
28
text_sensor::TextSensor
*
version_
{
nullptr
};
29
#endif
// USE_TEXT_SENSOR
30
};
31
32
}
// namespace esphome::libretiny
33
34
#endif
// USE_LIBRETINY
esphome::Component
Definition
component.h:87
esphome::libretiny::LTComponent
Definition
lt_component.h:17
esphome::libretiny::LTComponent::version_
text_sensor::TextSensor * version_
Definition
lt_component.h:28
esphome::libretiny::LTComponent::set_version_sensor
void set_version_sensor(text_sensor::TextSensor *version)
Definition
lt_component.h:23
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
Definition
text_sensor.h:28
component.h
defines.h
esphome::libretiny
Definition
core.h:7
sensor.h
text_sensor.h
Generated by
1.12.0