initial commit
This commit is contained in:
parent
f60dfdd52e
commit
4417c77875
18 changed files with 3522 additions and 0 deletions
35
components/fastcon/fastcon_light.h
Normal file
35
components/fastcon/fastcon_light.h
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <vector>
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/components/light/light_output.h"
|
||||
#include "fastcon_controller.h"
|
||||
|
||||
namespace esphome
|
||||
{
|
||||
namespace fastcon
|
||||
{
|
||||
enum class LightState
|
||||
{
|
||||
OFF,
|
||||
WARM_WHITE,
|
||||
RGB
|
||||
};
|
||||
|
||||
class FastconLight : public Component, public light::LightOutput
|
||||
{
|
||||
public:
|
||||
FastconLight(uint8_t light_id) : light_id_(light_id) {}
|
||||
|
||||
void setup() override;
|
||||
light::LightTraits get_traits() override;
|
||||
void write_state(light::LightState *state) override;
|
||||
void set_controller(FastconController *controller);
|
||||
|
||||
protected:
|
||||
FastconController *controller_{nullptr};
|
||||
uint8_t light_id_;
|
||||
};
|
||||
} // namespace fastcon
|
||||
} // namespace esphome
|
||||
Loading…
Add table
Add a link
Reference in a new issue