Update switch.mqtt.markdown

This commit is contained in:
Paulus Schoutsen 2016-02-08 09:10:27 -08:00
parent 4675c37618
commit fd3f94dc97

View File

@ -32,6 +32,7 @@ switch:
payload_on: "ON" payload_on: "ON"
payload_off: "OFF" payload_off: "OFF"
optimistic: false optimistic: false
retain: true
value_template: '{% raw %}{{ value.x }}{% endraw %}' value_template: '{% raw %}{{ value.x }}{% endraw %}'
``` ```
@ -44,6 +45,7 @@ Configuration variables:
- **payload_on** (*Optional*): The payload that represents enabled state. Default is "ON". - **payload_on** (*Optional*): The payload that represents enabled state. Default is "ON".
- **payload_off** (*Optional*): The payload that represents disabled state. Default is "OFF". - **payload_off** (*Optional*): The payload that represents disabled state. Default is "OFF".
- **optimistic** (*Optional*): Flag that defines if switch works in optimistic mode. Default is true if no state topic defined, else false. - **optimistic** (*Optional*): Flag that defines if switch works in optimistic mode. Default is true if no state topic defined, else false.
- **retain** (*Optional*): If the published message should have the retain flag on or not.
- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload. - **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload.
<p class='note warning'> <p class='note warning'>