From e64d60c990e261a62aa43966a925a92be5217c86 Mon Sep 17 00:00:00 2001 From: Stavros Korokithakis Date: Mon, 27 Nov 2017 17:26:54 +0200 Subject: [PATCH] Clarify how the state_value_template variable works (#4054) --- source/_components/light.mqtt.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_components/light.mqtt.markdown b/source/_components/light.mqtt.markdown index 99a1746623c..ba3041dde38 100644 --- a/source/_components/light.mqtt.markdown +++ b/source/_components/light.mqtt.markdown @@ -53,7 +53,7 @@ Configuration variables: - **rgb_state_topic** (*Optional*): The MQTT topic subscribed to receive RGB state updates. - **rgb_value_template** (*Optional*): Defines a [template](/docs/configuration/templating/#processing-incoming-data) to extract the RGB value. - **state_topic** (*Optional*): The MQTT topic subscribed to receive state updates. -- **state_value_template** (*Optional*): Defines a [template](/docs/configuration/templating/#processing-incoming-data) to extract the state value. +- **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 }}`. - **white_value_command_topic** (*Optional*): The MQTT topic to publish commands to change the light's white value. - **white_value_state_topic** (*Optional*): The MQTT topic subscribed to receive white value updates. - **white_value_value_template** (*Optional*): Defines a [template](/docs/configuration/templating/#processing-incoming-data) to extract the white value.