From 1fbb306369fcbf7be13aad2ca949eb3573cd6092 Mon Sep 17 00:00:00 2001 From: Markus Adrario Date: Fri, 26 Jan 2024 14:16:41 +0100 Subject: [PATCH] Correct typos in lightentity docs (#2060) ] iso } and add "s" to supported_color_modes in some locations --- docs/core/entity/light.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/core/entity/light.md b/docs/core/entity/light.md index 3365abba..30830a9b 100644 --- a/docs/core/entity/light.md +++ b/docs/core/entity/light.md @@ -22,7 +22,7 @@ A light entity controls the brightness, hue and saturation color value, white va | rgb_color | tuple[int, int, int] | None | `None` | The rgb color value (int, int, int). This property will be copied to the light's state attribute when the light's color mode is set to `ColorMode.RGB` and ignored otherwise. | rgbw_color | tuple[int, int, int, int] | None | `None` | The rgbw color value (int, int, int, int). This property will be copied to the light's state attribute when the light's color mode is set to `ColorMode.RGBW` and ignored otherwise. | rgbww_color | tuple[int, int, int, int, int] | None | `None` | The rgbww color value (int, int, int, int, int). This property will be copied to the light's state attribute when the light's color mode is set to `ColorMode.RGBWW` and ignored otherwise. -| supported_color_modes | set[ColorMode} | None | `None` | Flag supported color modes. +| supported_color_modes | set[ColorMode] | None | `None` | Flag supported color modes. | xy_color | tuple[float, float] | None | `None` | The xy color value (float, float). This property will be copied to the light's state attribute when the light's color mode is set to `ColorMode.XY` and ignored otherwise. ## Color Modes @@ -42,11 +42,11 @@ If a light does not implement the `supported_color_modes`, the `LightEntity` wil If a light does not implement the `color_mode`, the `LightEntity` will attempt to deduce it based on which of the properties are set and which are `None`: -- If `supported_color_mode` includes `ColorMode.RGBW` and `white_value` and `hs_color` are both not None: `ColorMode.RGBW` -- Else if `supported_color_mode` includes `ColorMode.HS` and `hs_color` is not None: `ColorMode.HS` -- Else if `supported_color_mode` includes `ColorMode.COLOR_TEMP` and `color_temp` is not None: `ColorMode.COLOR_TEMP` -- Else if `supported_color_mode` includes `ColorMode.BRIGHTNESS` and `brightness` is not None: `ColorMode.BRIGHTNESS` -- Else if `supported_color_mode` includes `ColorMode.ONOFF`: `ColorMode.ONOFF` +- If `supported_color_modes` includes `ColorMode.RGBW` and `white_value` and `hs_color` are both not None: `ColorMode.RGBW` +- Else if `supported_color_modes` includes `ColorMode.HS` and `hs_color` is not None: `ColorMode.HS` +- Else if `supported_color_modes` includes `ColorMode.COLOR_TEMP` and `color_temp` is not None: `ColorMode.COLOR_TEMP` +- Else if `supported_color_modes` includes `ColorMode.BRIGHTNESS` and `brightness` is not None: `ColorMode.BRIGHTNESS` +- Else if `supported_color_modes` includes `ColorMode.ONOFF`: `ColorMode.ONOFF` - Else: ColorMode.UNKNOWN | Value | Description