ESPHome  2024.11.1
custom_text_sensor.h
Go to the documentation of this file.
1 #pragma once
2 
5 
6 #include <vector>
7 
8 namespace esphome {
9 namespace custom {
10 
12  public:
13  CustomTextSensorConstructor(const std::function<std::vector<text_sensor::TextSensor *>()> &init) {
14  this->text_sensors_ = init();
15  }
16 
18 
19  void dump_config() override;
20 
21  protected:
22  std::vector<text_sensor::TextSensor *> text_sensors_;
23 };
24 
25 } // namespace custom
26 } // 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)
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
void init()
Definition: core.cpp:80