Modular light transformers (#2124)

This commit is contained in:
Oxan van Leeuwen
2021-08-11 06:51:35 +02:00
committed by GitHub
parent 11477dbc03
commit 46f17bea66
8 changed files with 195 additions and 150 deletions
+4
View File
@@ -3,6 +3,7 @@
#include "esphome/core/component.h"
#include "light_traits.h"
#include "light_state.h"
#include "light_transformer.h"
namespace esphome {
namespace light {
@@ -13,6 +14,9 @@ class LightOutput {
/// Return the LightTraits of this LightOutput.
virtual LightTraits get_traits() = 0;
/// Return the default transformer used for transitions.
virtual std::unique_ptr<LightTransformer> create_default_transition();
virtual void setup_state(LightState *state) {}
virtual void write_state(LightState *state) = 0;