ESPHome
2024.12.2
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