ESPHome
2025.2.2
Main Page
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
y
+
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
d
e
f
i
j
l
m
n
p
q
r
s
t
u
v
+
Enumerations
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
+
Enumerator
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
c
d
o
p
s
t
v
w
+
Enumerations
b
c
e
f
i
m
n
p
r
s
t
v
+
Enumerator
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
w
Related Functions
+
Files
File List
+
Globals
+
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
+
Functions
_
a
l
m
o
s
t
u
+
Variables
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
Typedefs
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Modules
Pages
esphome
esphome
components
uptime
text_sensor
uptime_text_sensor.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/core/defines.h
"
4
5
#include "
esphome/components/text_sensor/text_sensor.h
"
6
#include "
esphome/core/component.h
"
7
8
namespace
esphome
{
9
namespace
uptime {
10
11
class
UptimeTextSensor
:
public
text_sensor::TextSensor
,
public
PollingComponent
{
12
public
:
13
void
update
()
override
;
14
void
dump_config
()
override
;
15
void
setup
()
override
;
16
17
float
get_setup_priority
()
const override
;
18
19
protected
:
20
uint32_t
uptime_
{0};
// uptime in seconds, will overflow after 136 years
21
uint32_t
last_ms_
{0};
22
};
23
24
}
// namespace uptime
25
}
// namespace esphome
esphome::uptime::UptimeTextSensor::update
void update() override
Definition:
uptime_text_sensor.cpp:19
esphome::PollingComponent
This class simplifies creating components that periodically check a state.
Definition:
component.h:283
esphome::uptime::UptimeTextSensor::get_setup_priority
float get_setup_priority() const override
Definition:
uptime_text_sensor.cpp:59
esphome::uptime::UptimeTextSensor::dump_config
void dump_config() override
Definition:
uptime_text_sensor.cpp:60
esphome::text_sensor::TextSensor
Definition:
text_sensor.h:34
defines.h
esphome::uptime::UptimeTextSensor::last_ms_
uint32_t last_ms_
Definition:
uptime_text_sensor.h:21
esphome::uptime::UptimeTextSensor::setup
void setup() override
Definition:
uptime_text_sensor.cpp:12
esphome::uptime::UptimeTextSensor
Definition:
uptime_text_sensor.h:11
esphome::uptime::UptimeTextSensor::uptime_
uint32_t uptime_
Definition:
uptime_text_sensor.h:20
esphome
Implementation of SPI Controller mode.
Definition:
a01nyub.cpp:7
component.h
text_sensor.h
Generated by
1.8.13