Optimistic switch template (#12020)

This commit is contained in:
akloeckner 2020-07-14 16:30:20 +02:00 committed by GitHub
parent beb71a94a1
commit 796515f188
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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