1
0
mirror of https://github.com/esphome/esphome.git synced 2025-04-18 08:40:29 +01:00
esphome/esphome/components/custom/light/custom_light_output.h
2022-11-24 13:12:55 +13:00

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