5 #include "../lvgl_esphome.h" 18 float red, green, blue;
20 auto color = lv_color_make(red * 255, green * 255, blue * 255);
21 if (this->
obj_ !=
nullptr) {
39 lv_led_set_color(this->
obj_, value);
40 lv_led_on(this->
obj_);
value_type const & value() const
This class represents the communication layer between the front-end MQTT layer and the hardware outpu...
Interface to write LightStates to hardware.
optional< lv_color_t > initial_value_
void set_value_(lv_color_t value)
void current_values_as_rgb(float *red, float *green, float *blue, bool color_interlock=false)
lv_event_code_t lv_api_event
void set_obj(lv_obj_t *obj)
light::LightTraits get_traits() override
void write_state(light::LightState *state) override
This class is used to represent the capabilities of a light.
Implementation of SPI Controller mode.
Color can be controlled using RGB format (includes a brightness control for the color).