mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 07:17:14 +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
|
### 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:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user