Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated color_mode flag, adjust brightness description for MQTT json light #31707

Merged
merged 2 commits into from
Mar 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions source/_integrations/light.mqtt.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ When a state topic is not available, the light will work in optimistic mode. In
Optimistic mode can be forced, even if the `state_topic` is available. Try to enable it, if experiencing incorrect light operation.

Home Assistant internally assumes that a light's state corresponds to a defined `color_mode`.
The state of MQTT lights with default schema and support for both color and color temperature will set the `color_mode` according to the last received valid color or color temperature. Optionally, a `color_mode_state_topic` can be configured for explicit control of the `color_mode`
The state of MQTT lights with default schema and support for both color and color temperature will set the `color_mode` according to the last received valid color or color temperature. Optionally, a `color_mode_state_topic` can be configured for explicit control of the `color_mode`.

```yaml
# Example configuration.yaml entry
Expand Down Expand Up @@ -563,7 +563,7 @@ availability_topic:
required: false
type: string
brightness:
description: Flag that defines if the light supports brightness.
description: Flag that defines if light supports brightness when the `rgb`, `rgbw`, or `rgbww` color mode is supported.
required: false
type: boolean
default: false
Expand All @@ -572,11 +572,6 @@ brightness_scale:
required: false
type: integer
default: 255
color_mode:
description: Flag that defines if the light supports color modes.
required: false
type: boolean
default: false
command_topic:
description: The MQTT topic to publish commands to change the light’s state.
required: true
Expand Down Expand Up @@ -715,7 +710,7 @@ state_topic:
required: false
type: string
supported_color_modes:
description: A list of color modes supported by the list. This is required if `color_mode` is `True`. Possible color modes are `onoff`, `brightness`, `color_temp`, `hs`, `xy`, `rgb`, `rgbw`, `rgbww`, `white`. Note that if `onoff` **or** `brightness` are used, that must be the _only_ value in the list.
description: A list of color modes supported by the list. Possible color modes are `onoff`, `brightness`, `color_temp`, `hs`, `xy`, `rgb`, `rgbw`, `rgbww`, `white`. Note that if `onoff` **or** `brightness` are used, that must be the _only_ value in the list.
required: false
type: list
unique_id:
Expand Down Expand Up @@ -758,7 +753,6 @@ mqtt:
state_topic: "home/rgb1"
command_topic: "home/rgb1/set"
brightness: true
color_mode: true
supported_color_modes: ["rgb"]
```

Expand All @@ -775,7 +769,6 @@ mqtt:
state_topic: "home/rgb1"
command_topic: "home/rgb1/set"
brightness: true
color_mode: true
supported_color_modes: ["brightness"]
```

Expand All @@ -793,7 +786,6 @@ mqtt:
command_topic: "home/light/set"
brightness: true
brightness_scale: 4095
color_mode: true
supported_color_modes: ["brightness"]
```

Expand All @@ -817,7 +809,6 @@ mqtt:
name: mqtt_json_hs_light
state_topic: "home/light"
command_topic: "home/light/set"
color_mode: true
supported_color_modes: ["hs"]
```

Expand Down Expand Up @@ -847,7 +838,6 @@ mqtt:
state_topic: "home/rgbw1"
command_topic: "home/rgbw1/set"
brightness: true
color_mode: true
supported_color_modes: ["rgbw"]
```

Expand Down