Add command_template option to mqtt switch (#33855)

This commit is contained in:
Jan Bouwhuis 2024-07-19 12:10:55 +02:00 committed by GitHub
parent 11aec70466
commit 92a4bdd366
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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