ESPHome  2024.7.2
custom_cover.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 #include <vector>
6 
7 namespace esphome {
8 namespace custom {
9 
11  public:
12  CustomCoverConstructor(const std::function<std::vector<cover::Cover *>()> &init) { this->covers_ = init(); }
13 
14  cover::Cover *get_cover(int i) { return this->covers_[i]; }
15 
16  protected:
17  std::vector<cover::Cover *> covers_;
18 };
19 
20 } // namespace custom
21 } // namespace esphome
Base class for all cover devices.
Definition: cover.h:111
std::vector< cover::Cover * > covers_
Definition: custom_cover.h:17
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
void init()
Definition: core.cpp:80
CustomCoverConstructor(const std::function< std::vector< cover::Cover *>()> &init)
Definition: custom_cover.h:12