ESPHome
2025.2.0
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
tuya
sensor
tuya_sensor.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/core/component.h
"
4
#include "
esphome/components/tuya/tuya.h
"
5
#include "
esphome/components/sensor/sensor.h
"
6
7
namespace
esphome
{
8
namespace
tuya {
9
10
class
TuyaSensor
:
public
sensor::Sensor
,
public
Component
{
11
public
:
12
void
setup
()
override
;
13
void
dump_config
()
override
;
14
void
set_sensor_id
(uint8_t sensor_id) { this->
sensor_id_
= sensor_id; }
15
16
void
set_tuya_parent
(
Tuya
*parent) { this->
parent_
= parent; }
17
18
protected
:
19
Tuya
*
parent_
;
20
uint8_t
sensor_id_
{0};
21
};
22
23
}
// namespace tuya
24
}
// namespace esphome
esphome::tuya::TuyaSensor::setup
void setup() override
Definition:
tuya_sensor.cpp:10
esphome::Component
Definition:
component.h:68
sensor.h
esphome::tuya::TuyaSensor
Definition:
tuya_sensor.h:10
esphome::tuya::TuyaSensor::set_sensor_id
void set_sensor_id(uint8_t sensor_id)
Definition:
tuya_sensor.h:14
esphome::tuya::TuyaSensor::parent_
Tuya * parent_
Definition:
tuya_sensor.h:19
esphome::tuya::Tuya
Definition:
tuya.h:88
esphome::tuya::TuyaSensor::sensor_id_
uint8_t sensor_id_
Definition:
tuya_sensor.h:20
tuya.h
esphome::tuya::TuyaSensor::dump_config
void dump_config() override
Definition:
tuya_sensor.cpp:28
esphome::tuya::TuyaSensor::set_tuya_parent
void set_tuya_parent(Tuya *parent)
Definition:
tuya_sensor.h:16
esphome
Implementation of SPI Controller mode.
Definition:
a01nyub.cpp:7
component.h
esphome::sensor::Sensor
Base-class for all sensors.
Definition:
sensor.h:57
Generated by
1.8.13