From fd3f94dc97312a5f80bfcb5bae0e63ab23a85b6d Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 8 Feb 2016 09:10:27 -0800 Subject: [PATCH] Update switch.mqtt.markdown --- source/_components/switch.mqtt.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/_components/switch.mqtt.markdown b/source/_components/switch.mqtt.markdown index 6c609991110..0d471b54a07 100644 --- a/source/_components/switch.mqtt.markdown +++ b/source/_components/switch.mqtt.markdown @@ -32,6 +32,7 @@ switch: payload_on: "ON" payload_off: "OFF" optimistic: false + retain: true 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_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. +- **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.