ESPHome  2024.2.1
Go to the documentation of this file.
1 #pragma once
4 #include "light_traits.h"
5 #include "light_state.h"
6 #include "light_transformer.h"
8 namespace esphome {
9 namespace light {
12 class LightOutput {
13  public:
15  virtual LightTraits get_traits() = 0;
18  virtual std::unique_ptr<LightTransformer> create_default_transition();
20  virtual void setup_state(LightState *state) {}
24  virtual void update_state(LightState *state) {}
29  virtual void write_state(LightState *state) = 0;
30 };
32 } // namespace light
33 } // namespace esphome
This class represents the communication layer between the front-end MQTT layer and the hardware outpu...
Definition: light_state.h:34
Interface to write LightStates to hardware.
Definition: light_output.h:12
virtual std::unique_ptr< LightTransformer > create_default_transition()
Return the default transformer used for transitions.
Definition: light_output.cpp:7
virtual void write_state(LightState *state)=0
Called from loop() every time the light state has changed, and should should write the new state to h...
virtual void update_state(LightState *state)
Called on every update of the current values of the associated LightState, can optionally be used to ...
Definition: light_output.h:24
This class is used to represent the capabilities of a light.
Definition: light_traits.h:11
virtual void setup_state(LightState *state)
Definition: light_output.h:20
This is a workaround until we can figure out a way to get the tflite-micro idf component code availab...
Definition: a01nyub.cpp:7
virtual LightTraits get_traits()=0
Return the LightTraits of this LightOutput.
bool state
Definition: fan.h:34