ESPHome  2024.12.2
custom_climate.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  CustomClimateConstructor(const std::function<std::vector<climate::Climate *>()> &init) { this->climates_ = init(); }
14 
15  climate::Climate *get_climate(int i) { return this->climates_[i]; }
16 
17  protected:
18  std::vector<climate::Climate *> climates_;
19 };
20 
21 } // namespace custom
22 } // namespace esphome
std::vector< climate::Climate * > climates_
CustomClimateConstructor(const std::function< std::vector< climate::Climate *>()> &init)
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
void init()
Definition: core.cpp:80
climate::Climate * get_climate(int i)
ClimateDevice - This is the base class for all climate integrations.
Definition: climate.h:168