Mqtt light command templates (#25504)

This commit is contained in:
Sándor Oroszi 2023-01-03 13:36:22 +01:00 committed by GitHub
parent e6e2fd9889
commit eb568321d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View File

@ -217,6 +217,10 @@ effect_value_template:
description: "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the effect value." description: "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the effect value."
required: false required: false
type: string type: string
hs_command_template:
description: "Defines a [template](/docs/configuration/templating/) to compose message which will be sent to `hs_command_topic`. Available variables: `hue` and `sat`."
required: false
type: string
hs_command_topic: hs_command_topic:
description: "The MQTT topic to publish commands to change the light's color state in HS format (Hue Saturation). description: "The MQTT topic to publish commands to change the light's color state in HS format (Hue Saturation).
Range for Hue: 0° .. 360°, Range of Saturation: 0..100. Range for Hue: 0° .. 360°, Range of Saturation: 0..100.
@ -224,7 +228,7 @@ hs_command_topic:
required: false required: false
type: string type: string
hs_state_topic: hs_state_topic:
description: "The MQTT topic subscribed to receive color state updates in HS format. description: "The MQTT topic subscribed to receive color state updates in HS format. The expected payload is the hue and saturation values separated by commas, for example, `359.5,100.0`.
Note: Brightness is received separately in the `brightness_state_topic`." Note: Brightness is received separately in the `brightness_state_topic`."
required: false required: false
type: string type: string
@ -374,12 +378,16 @@ white_scale:
required: false required: false
type: integer type: integer
default: 255 default: 255
xy_command_template:
description: "Defines a [template](/docs/configuration/templating/) to compose message which will be sent to `xy_command_topic`. Available variables: `x` and `y`."
required: false
type: string
xy_command_topic: xy_command_topic:
description: "The MQTT topic to publish commands to change the light's XY state." description: "The MQTT topic to publish commands to change the light's XY state."
required: false required: false
type: string type: string
xy_state_topic: xy_state_topic:
description: The MQTT topic subscribed to receive XY state updates. description: The MQTT topic subscribed to receive XY state updates. The expected payload is the X and Y color values separated by commas, for example, `0.675,0.322`.
required: false required: false
type: string type: string
xy_value_template: xy_value_template:

View File

@ -308,6 +308,7 @@ Configuration variable names in the discovery payload may be abbreviated to cons
'hold_stat_tpl': 'hold_state_template', 'hold_stat_tpl': 'hold_state_template',
'hold_stat_t': 'hold_state_topic', 'hold_stat_t': 'hold_state_topic',
'hs_cmd_t': 'hs_command_topic', 'hs_cmd_t': 'hs_command_topic',
'hs_cmd_tpl': 'hs_command_template',
'hs_stat_t': 'hs_state_topic', 'hs_stat_t': 'hs_state_topic',
'hs_val_tpl': 'hs_value_template', 'hs_val_tpl': 'hs_value_template',
'ic': 'icon', 'ic': 'icon',
@ -483,6 +484,7 @@ Configuration variable names in the discovery payload may be abbreviated to cons
'whit_val_stat_t': 'white_value_state_topic', 'whit_val_stat_t': 'white_value_state_topic',
'whit_val_tpl': 'white_value_template', 'whit_val_tpl': 'white_value_template',
'xy_cmd_t': 'xy_command_topic', 'xy_cmd_t': 'xy_command_topic',
'xy_cmd_tpl': 'xy_command_template',
'xy_stat_t': 'xy_state_topic', 'xy_stat_t': 'xy_state_topic',
'xy_val_tpl': 'xy_value_template', 'xy_val_tpl': 'xy_value_template',
``` ```