mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 07:17:14 +00:00
Add command_template option to mqtt switch (#33855)
This commit is contained in:
parent
11aec70466
commit
92a4bdd366
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user