From acb0557228bf8fd47cf5d467aa02e5d2238041f9 Mon Sep 17 00:00:00 2001 From: Gil Peeters Date: Sat, 28 Sep 2019 21:59:32 +1000 Subject: [PATCH] Added 'availability_template' to all Template Fan platform (#10312) * Added 'availability_template' to all Template Fan platform * Fixed Syntax and default * Removed optional parameter from example config * Apply suggestions from code review Co-Authored-By: Franck Nijhof --- source/_components/fan.template.markdown | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/_components/fan.template.markdown b/source/_components/fan.template.markdown index 077030cd16f..9f1cef8b046 100644 --- a/source/_components/fan.template.markdown +++ b/source/_components/fan.template.markdown @@ -17,6 +17,7 @@ To enable Template Fans in your installation, add the following to your `configuration.yaml` file: {% raw %} + ```yaml # Example configuration.yaml entry fan: @@ -49,6 +50,7 @@ fan: - '2' - '3' ``` + {% endraw %} {% configuration %} @@ -77,6 +79,11 @@ fan: description: "Defines a template to get the direction of the fan. Valid value: 'forward'/'reverse'" required: false type: template + 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 + type: template + default: true turn_on: description: Defines an action to run when the fan is turned on. required: true