52 lines
1.1 KiB
YAML
52 lines
1.1 KiB
YAML
- id: garage_auto_claus_distance
|
|
alias: Garage auto Claus
|
|
|
|
trigger:
|
|
- platform: numeric_state
|
|
entity_id: sensor.claus_distance_home
|
|
below: 40
|
|
id: arriving
|
|
|
|
- platform: numeric_state
|
|
entity_id: sensor.claus_distance_home
|
|
above: 60
|
|
id: leaving
|
|
|
|
condition:
|
|
- condition: time
|
|
after: "05:30:00"
|
|
before: "22:30:00"
|
|
- condition: state
|
|
entity_id: device_tracker.snowywhite_location_tracker
|
|
state: "home"
|
|
|
|
action:
|
|
- choose:
|
|
|
|
# ÅBN
|
|
- conditions:
|
|
- condition: trigger
|
|
id: arriving
|
|
- condition: state
|
|
entity_id: cover.anne
|
|
state: "closed"
|
|
sequence:
|
|
- service: cover.open_cover
|
|
target:
|
|
entity_id: cover.anne
|
|
|
|
# LUK
|
|
- conditions:
|
|
- condition: trigger
|
|
id: leaving
|
|
- condition: state
|
|
entity_id: cover.anne
|
|
state: "open"
|
|
sequence:
|
|
- service: cover.close_cover
|
|
target:
|
|
entity_id: cover.anne
|
|
|
|
mode: single
|
|
|