From 1958a68c21d1559b691ba92e50bcf87c6e713183 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Sat, 16 Sep 2023 10:24:05 +0200 Subject: [PATCH] Align documented light attributes with implementation (#1924) Co-authored-by: Martin Hjelmare Co-authored-by: Franck Nijhof --- docs/core/entity/light.md | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/docs/core/entity/light.md b/docs/core/entity/light.md index ee7eced5..7893356d 100644 --- a/docs/core/entity/light.md +++ b/docs/core/entity/light.md @@ -10,22 +10,20 @@ A light entity controls the brightness, hue and saturation color value, white va | Name | Type | Default | Description | ---- | ---- | ---- | ---- -| brightness | int | None | Return the brightness of this light between 1..255 -| color_mode | string | None | Return the color mode of the light. The returned color mode must be present in the `supported_color_modes` property. -| color_temp_kelvin | int | None | Return the CT color value in K. This property will be copied to the light's state attribute when the light's color mode is set to `ColorMode.COLOR_TEMP` and ignored otherwise. -| effect | String | None | Return the current effect. -| effect_list | list | None | Return the list of supported effects. -| hs_color | tuple | None | Return the hue and saturation 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.HS` and ignored otherwise. -| is_on | bool | `None` | Returns if the light entity is on or not. -| max_color_temp_kelvin | int | int | Return the coldest color_temp_kelvin that this light supports. -| min_color_temp_kelvin | int | int | Return the warmest color_temp_kelvin that this light supports. -| rgb_color | tuple | None | Return 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 | None | Return 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 | None | Return 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 | None | Flag supported color modes. -| supported_features | int | int | Flag supported features. -| white_value | int | None | Return the white value of this light between 0..255. This is deprecated and will be removed in Home Assistant 2021.10. -| xy_color | tuple | None | Return 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. +| brightness | int | None | `None` | The brightness of this light between 1..255 +| color_mode | ColorMode | None | `None` | The color mode of the light. The returned color mode must be present in the `supported_color_modes` property. +| color_temp_kelvin | int | None | `None` | The CT color value in K. This property will be copied to the light's state attribute when the light's color mode is set to `ColorMode.COLOR_TEMP` and ignored otherwise. +| effect | str | None | `None` | The current effect. +| effect_list | list[str] | None | `None` | The list of supported effects. +| hs_color | tuple[float, float] | None | `None` | The hue and saturation 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.HS` and ignored otherwise. +| is_on | bool | None | `None` | If the light entity is on or not. +| max_color_temp_kelvin | int | None | `None` | The coldest color_temp_kelvin that this light supports. +| min_color_temp_kelvin | int | None | `None` | The warmest color_temp_kelvin that this light supports. +| 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. +| 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