From 7c9d8664c439162ea08d37fe7c9457dee48bc20d Mon Sep 17 00:00:00 2001 From: Mario Limonciello Date: Mon, 29 Mar 2021 06:26:26 -0500 Subject: [PATCH] This prevents Google Assistant from opening a door without security via close command (#17126) Co-authored-by: Franck Nijhof --- source/_integrations/cover.template.markdown | 23 ++++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/source/_integrations/cover.template.markdown b/source/_integrations/cover.template.markdown index 3b8c0053a37..c04930f1a33 100644 --- a/source/_integrations/cover.template.markdown +++ b/source/_integrations/cover.template.markdown @@ -145,7 +145,8 @@ In this section you will find some real-life examples of how to use this cover. ### Garage Door This example converts a garage door with a controllable switch and position -sensor into a cover. +sensor into a cover. The condition check is optional, but suggested if you +use the same switch to open and close the garage. {% raw %} @@ -158,13 +159,21 @@ cover: friendly_name: "Garage Door" position_template: "{{ states('sensor.garage_door') }}" open_cover: - service: switch.turn_on - target: - entity_id: switch.garage_door + - condition: + condition: state + entity_id: sensor.garage_door + state: "off" + - service: switch.turn_on + target: + entity_id: switch.garage_door close_cover: - service: switch.turn_off - target: - entity_id: switch.garage_door + - condition: + condition: state + entity_id: sensor.garage_door + state: "on" + - service: switch.turn_off + target: + entity_id: switch.garage_door stop_cover: service: switch.turn_on target: