ESPHome  2022.5.1
custom_text_sensor.h
Go to the documentation of this file.
1 #pragma once
2 
5 
6 namespace esphome {
7 namespace custom {
8 
10  public:
11  CustomTextSensorConstructor(const std::function<std::vector<text_sensor::TextSensor *>()> &init) {
12  this->text_sensors_ = init();
13  }
14 
16 
17  void dump_config() override;
18 
19  protected:
20  std::vector<text_sensor::TextSensor *> text_sensors_;
21 };
22 
23 } // namespace custom
24 } // namespace esphome
text_sensor::TextSensor * get_text_sensor(int i)
std::vector< text_sensor::TextSensor * > text_sensors_
CustomTextSensorConstructor(const std::function< std::vector< text_sensor::TextSensor *>()> &init)
Definition: a4988.cpp:4
void init()
Definition: core.cpp:85