From 15db244e12f96fd7b161b6f53d439e1546193dfb Mon Sep 17 00:00:00 2001 From: Amir Hanan Date: Sun, 7 Oct 2018 12:29:20 +0300 Subject: [PATCH] 2 for 1: configuration markdown & usage sample (#6573) * 2 for 1: configuration markdown & usage sample Fixing configuration markdown #6385 also, added a simple switch example for AC management. * Fix configuration section Hope I got it right this time :) --- source/_components/climate.sensibo.markdown | 39 +++++++++++++++++---- 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/source/_components/climate.sensibo.markdown b/source/_components/climate.sensibo.markdown index 02003d4aa6a..85577dcdf81 100644 --- a/source/_components/climate.sensibo.markdown +++ b/source/_components/climate.sensibo.markdown @@ -24,12 +24,16 @@ climate: api_key: ``` -Configuration variables: - -- **api_key** (*Required*): Your API key. -- **id** (*Optional*): A unit ID or a list of IDs. If none specified then all units accessible by the `api_key` will be used. - -To get your API key visit +{% configuration %} +api_key: + description: Your Sensibo API key (To get your API key visit ). + required: true + type: string +id: + description: A unit ID or a list of IDs. If none specified then all units accessible by the `api_key` will be used. + required: false + type: string +{% endconfiguration %}

If you create the API key using a dedicated user (and not your main user), @@ -46,3 +50,26 @@ climate: - id1 - id2 ``` + +### {% linkable_title Adding a quick switch example %} + +If you want a "Quick Switch" to turn your AC On / Off, you can do that using the following `Switch Template`: + +{% raw %} +```yaml +switch: + - platform: template + switches: + ac: + friendly_name: "AC" + value_template: "{{ is_state('climate.ac', 'cool') or is_state('climate.ac', 'heat') or is_state('climate.ac', 'dry') or is_state('climate.ac', 'heat')}}" + turn_on: + service: climate.turn_on + data: + entity_id: climate.ac + turn_off: + service: climate.turn_off + data: + entity_id: climate.ac +``` +{% endraw %}