From 796515f1880d6b6c49789fbaa0858db8e3a02f16 Mon Sep 17 00:00:00 2001 From: akloeckner Date: Tue, 14 Jul 2020 16:30:20 +0200 Subject: [PATCH] Optimistic switch template (#12020) --- source/_integrations/switch.template.markdown | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/_integrations/switch.template.markdown b/source/_integrations/switch.template.markdown index 58d15e643b5..ad351a8dbd4 100644 --- a/source/_integrations/switch.template.markdown +++ b/source/_integrations/switch.template.markdown @@ -55,9 +55,10 @@ switch: required: false type: [string, list] value_template: - description: Defines a template to set the state of the switch. - required: true + description: Defines a template to set the state of the switch. If not defined, the switch will optimistically assume all commands are successful. + required: false type: template + default: optimistic availability_template: description: Defines a template to get the `available` state of the component. If the template returns `true`, the device is `available`. If the template returns any other value, the device will be `unavailable`. If `availability_template` is not configured, the component will always be `available`. required: false