Skip to content

Commit

Permalink
Allow color_mode to be processed in Kelvin for MQTT template light (#…
Browse files Browse the repository at this point in the history
…36539)

* Allow color_mode to be processed in Kelvin for MQTT template light

* Add color_temp_kelvin documentation
  • Loading branch information
jbouwh authored Jan 10, 2025
1 parent 8864a17 commit a4daf39
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions source/_integrations/light.mqtt.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -978,16 +978,21 @@ brightness_template:
description: "[Template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract brightness from the state payload value. Expected result of the template is an integer from 0-255 range."
required: false
type: template
color_temp_kelvin:
description: "When set to `true`, `command_topic` will publish color mode updates in Kelvin and process `state_topic` will process state updates in Kelvin. When not set the `color_temp` values are converted to mireds."
required: false
type: boolean
default: false
color_temp_template:
description: "[Template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract color temperature from the state payload value. Expected result of the template is an integer representing mired units."
description: "[Template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract color temperature from the state payload value. Expected result of the template is an integer. If `color_temp_kelvin` is `true` the expected value is in Kelvin else mireds are expected."
required: false
type: template
command_off_template:
description: "The [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) for *off* state changes. Available variables: `state` and `transition`."
required: true
type: template
command_on_template:
description: "The [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) for *on* state changes. Available variables: `state`, `brightness`, `color_temp`, `red`, `green`, `blue`, `hue`, `sat`, `flash`, `transition` and `effect`. Values `red`, `green`, `blue`, `brightness` are provided as integers from range 0-255. Value of `hue` is provided as float from range 0-360. Value of `sat` is provided as float from range 0-100. Value of `color_temp` is provided as integer representing mired units."
description: "The [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) for *on* state changes. Available variables: `state`, `brightness`, `color_temp`, `red`, `green`, `blue`, `hue`, `sat`, `flash`, `transition` and `effect`. Values `red`, `green`, `blue`, `brightness` are provided as integers from range 0-255. Value of `hue` is provided as float from range 0-360. Value of `sat` is provided as float from range 0-100. Value of `color_temp` is provided as integer representing mired or Kelvin units if `color_temp_kelvin` is `true`."
required: true
type: template
command_topic:
Expand Down Expand Up @@ -1069,10 +1074,20 @@ json_attributes_topic:
description: The MQTT topic subscribed to receive a JSON dictionary payload and then set as sensor attributes. Usage example can be found in [MQTT sensor](/integrations/sensor.mqtt/#json-attributes-topic-configuration) documentation.
required: false
type: string
max_kelvin:
description: The maximum color temperature in Kelvin.
required: false
type: integer
default: 6535
max_mireds:
description: The maximum color temperature in mireds.
required: false
type: integer
min_kelvin:
description: The minimum color temperature in Kelvin.
required: false
type: integer
default: 2000
min_mireds:
description: The minimum color temperature in mireds.
required: false
Expand Down

0 comments on commit a4daf39

Please sign in to comment.