mirror of
https://github.com/esphome/esphome.git
synced 2025-04-18 08:40:29 +01:00
25 lines
517 B
C++
25 lines
517 B
C++
#pragma once
|
|
|
|
#include "esphome/core/component.h"
|
|
#include "esphome/components/light/light_output.h"
|
|
|
|
#include <vector>
|
|
|
|
namespace esphome {
|
|
namespace custom {
|
|
|
|
class CustomLightOutputConstructor {
|
|
public:
|
|
CustomLightOutputConstructor(const std::function<std::vector<light::LightOutput *>()> &init) {
|
|
this->outputs_ = init();
|
|
}
|
|
|
|
light::LightOutput *get_light(int i) { return this->outputs_[i]; }
|
|
|
|
protected:
|
|
std::vector<light::LightOutput *> outputs_;
|
|
};
|
|
|
|
} // namespace custom
|
|
} // namespace esphome
|