ESPHome 2026.8.0-dev
Loading...
Searching...
No Matches
pixoo_light.h
Go to the documentation of this file.
1#pragma once
2
7
8namespace esphome::pixoo {
9
10// Brightness-only light that drives the Pixoo panel's LIGHT command.
11class PixooLight : public light::LightOutput, public Parented<Pixoo> {
12 public:
14 auto traits = light::LightTraits();
15 traits.set_supported_color_modes({light::ColorMode::BRIGHTNESS});
16 return traits;
17 }
18
20 float brightness;
21 state->current_values_as_brightness(&brightness);
22 this->parent_->set_panel_brightness(brightness);
23 }
24};
25
26} // namespace esphome::pixoo
Helper class to easily give an object a parent of type T.
Definition helpers.h:1875
Interface to write LightStates to hardware.
This class represents the communication layer between the front-end MQTT layer and the hardware outpu...
Definition light_state.h:93
This class is used to represent the capabilities of a light.
Definition light_traits.h:9
void write_state(light::LightState *state) override
Definition pixoo_light.h:19
light::LightTraits get_traits() override
Definition pixoo_light.h:13
bool state
Definition fan.h:2
@ BRIGHTNESS
Dimmable light.