ESPHome  2024.10.2
copy_sensor.h
Go to the documentation of this file.
1 #pragma once
2 
5 
6 namespace esphome {
7 namespace copy {
8 
9 class CopySensor : public sensor::Sensor, public Component {
10  public:
11  void set_source(sensor::Sensor *source) { source_ = source; }
12  void setup() override;
13  void dump_config() override;
14  float get_setup_priority() const override { return setup_priority::DATA; }
15 
16  protected:
18 };
19 
20 } // namespace copy
21 } // namespace esphome
const float DATA
For components that import data from directly connected sensors like DHT.
Definition: component.cpp:19
float get_setup_priority() const override
Definition: copy_sensor.h:14
void dump_config() override
Definition: copy_sensor.cpp:15
sensor::Sensor * source_
Definition: copy_sensor.h:17
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
void set_source(sensor::Sensor *source)
Definition: copy_sensor.h:11
void setup() override
Definition: copy_sensor.cpp:9
Base-class for all sensors.
Definition: sensor.h:57