This prevents Google Assistant from opening a door without security via close command (#17126)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
Mario Limonciello 2021-03-29 06:26:26 -05:00 committed by GitHub
parent 7d884b7346
commit 7c9d8664c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -145,7 +145,8 @@ In this section you will find some real-life examples of how to use this cover.
### Garage Door ### Garage Door
This example converts a garage door with a controllable switch and position 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 %} {% raw %}
@ -158,13 +159,21 @@ cover:
friendly_name: "Garage Door" friendly_name: "Garage Door"
position_template: "{{ states('sensor.garage_door') }}" position_template: "{{ states('sensor.garage_door') }}"
open_cover: open_cover:
service: switch.turn_on - condition:
target: condition: state
entity_id: switch.garage_door entity_id: sensor.garage_door
state: "off"
- service: switch.turn_on
target:
entity_id: switch.garage_door
close_cover: close_cover:
service: switch.turn_off - condition:
target: condition: state
entity_id: switch.garage_door entity_id: sensor.garage_door
state: "on"
- service: switch.turn_off
target:
entity_id: switch.garage_door
stop_cover: stop_cover:
service: switch.turn_on service: switch.turn_on
target: target: