mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 15:26:59 +00:00
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:
parent
7d884b7346
commit
7c9d8664c4
@ -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,11 +159,19 @@ cover:
|
||||
friendly_name: "Garage Door"
|
||||
position_template: "{{ states('sensor.garage_door') }}"
|
||||
open_cover:
|
||||
service: switch.turn_on
|
||||
- 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
|
||||
- condition:
|
||||
condition: state
|
||||
entity_id: sensor.garage_door
|
||||
state: "on"
|
||||
- service: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.garage_door
|
||||
stop_cover:
|
||||
|
Loading…
x
Reference in New Issue
Block a user