ESPHome  2024.12.2
custom_binary_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  CustomBinarySensorConstructor(const std::function<std::vector<binary_sensor::BinarySensor *>()> &init) {
14  this->binary_sensors_ = init();
15  }
16 
18 
19  void dump_config() override;
20 
21  protected:
22  std::vector<binary_sensor::BinarySensor *> binary_sensors_;
23 };
24 
25 } // namespace custom
26 } // namespace esphome
CustomBinarySensorConstructor(const std::function< std::vector< binary_sensor::BinarySensor *>()> &init)
binary_sensor::BinarySensor * get_binary_sensor(int i)
std::vector< binary_sensor::BinarySensor * > binary_sensors_
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
Base class for all binary_sensor-type classes.
Definition: binary_sensor.h:37
void init()
Definition: core.cpp:80