mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-02-23 02:51:38 +01:00
Fix example code in custom light output documentation (#1597)
In the override of get_traits() there were calls to deprecated methods.
This commit is contained in:
parent
2f35aed205
commit
54d22ee5db
@ -26,8 +26,7 @@ The example below is an example of a custom light output.
|
||||
LightTraits get_traits() override {
|
||||
// return the traits this light supports
|
||||
auto traits = LightTraits();
|
||||
traits.set_supports_brightness(true);
|
||||
traits.set_supports_color_modes({ColorMode::RGB});
|
||||
traits.set_supported_color_modes({ColorMode::RGB, ColorMode::BRIGHTNESS});
|
||||
return traits;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user