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:
bulburDE 2021-11-14 16:06:16 +01:00 committed by GitHub
parent 2f35aed205
commit 54d22ee5db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}