ESPHome  2024.11.0
tuya_sensor.h
Go to the documentation of this file.
1 #pragma once
2 
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:
20  uint8_t sensor_id_{0};
21 };
22 
23 } // namespace tuya
24 } // namespace esphome
void set_sensor_id(uint8_t sensor_id)
Definition: tuya_sensor.h:14
void dump_config() override
Definition: tuya_sensor.cpp:28
void set_tuya_parent(Tuya *parent)
Definition: tuya_sensor.h:16
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
Base-class for all sensors.
Definition: sensor.h:57