18 float red, green, blue;
19 state->current_values_as_rgb(&red, &green, &blue,
false);
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_);
Interface to write LightStates to hardware.
This class represents the communication layer between the front-end MQTT layer and the hardware outpu...
This class is used to represent the capabilities of a light.
light::LightTraits get_traits() override
optional< lv_color_t > initial_value_
void set_obj(lv_obj_t *obj)
void write_state(light::LightState *state) override
void set_value_(lv_color_t value)
value_type const & value() const
lv_event_code_t lv_api_event
Providing packet encoding functions for exchanging data with a remote host.