Skip to content

Commit e64d60c

Browse files
skorokithakisfabaff
authored andcommitted
Clarify how the state_value_template variable works (home-assistant#4054)
1 parent 28154fc commit e64d60c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/_components/light.mqtt.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Configuration variables:
5353
- **rgb_state_topic** (*Optional*): The MQTT topic subscribed to receive RGB state updates.
5454
- **rgb_value_template** (*Optional*): Defines a [template](/docs/configuration/templating/#processing-incoming-data) to extract the RGB value.
5555
- **state_topic** (*Optional*): The MQTT topic subscribed to receive state updates.
56-
- **state_value_template** (*Optional*): Defines a [template](/docs/configuration/templating/#processing-incoming-data) to extract the state value.
56+
- **state_value_template** (*Optional*): Defines a [template](/docs/configuration/templating/#processing-incoming-data) to extract the state value. The template should match the payload "on" and "off" values, so if your light uses "power on" to turn on, your `state_value_template` string should return "power on" when the switch is on. For example if the message is just "on", your `state_value_template` should be `power {{ value }}`.
5757
- **white_value_command_topic** (*Optional*): The MQTT topic to publish commands to change the light's white value.
5858
- **white_value_state_topic** (*Optional*): The MQTT topic subscribed to receive white value updates.
5959
- **white_value_value_template** (*Optional*): Defines a [template](/docs/configuration/templating/#processing-incoming-data) to extract the white value.

0 commit comments

Comments
 (0)