From 92a4bdd36604e2e8e2827a0a792e27e7ae67aefa Mon Sep 17 00:00:00 2001 From: Jan Bouwhuis Date: Fri, 19 Jul 2024 12:10:55 +0200 Subject: [PATCH] Add command_template option to mqtt switch (#33855) --- source/_integrations/switch.mqtt.markdown | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/_integrations/switch.mqtt.markdown b/source/_integrations/switch.mqtt.markdown index 1ac9b513e7a..1aade14aeff 100644 --- a/source/_integrations/switch.mqtt.markdown +++ b/source/_integrations/switch.mqtt.markdown @@ -64,6 +64,10 @@ availability_topic: description: The MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with `availability`. required: false type: string +command_template: + description: Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to generate the payload to send to `command_topic`. The switch command template accepts the parameters `value`. The `value` parameter will contain the configured value for either `payload_on` or `payload_off`. + required: false + type: template command_topic: description: The MQTT topic to publish commands to change the switch state. required: true