Files
N22/include/automations/open_garage_when_car_arrives.yaml
T
claus 290b0aa373 Update garage automation to use device_tracker and add notifications
- Replace sensor.claus_distance_home with device_tracker.clausiphone (home/not_home)
- Change triggers from numeric_state to state-based presence detection
- Adjust active time window to 05:00–23:00
- Add push notifications to mobile_app_clausiphone15 on garage open/close
2026-03-19 06:59:52 +01:00

62 lines
1.4 KiB
YAML

- id: garage_auto_claus_presence
alias: Garage auto Claus
trigger:
- platform: state
entity_id: device_tracker.clausiphone
to: "home"
id: arriving
- platform: state
entity_id: device_tracker.clausiphone
from: "home"
to: "not_home"
id: leaving
condition:
- condition: time
after: "05:00:00"
before: "23:00:00"
- condition: state
entity_id: device_tracker.snowywhite_location_tracker
state: "home"
action:
- choose:
# ÅBN (Arriving)
- conditions:
- condition: trigger
id: arriving
- condition: state
entity_id: cover.anne
state: "closed"
sequence:
- service: cover.open_cover
target:
entity_id: cover.anne
- service: notify.mobile_app_clausiphone15
data:
message: "Garage opened (arrival detected)"
# LUK (Leaving)
- conditions:
- condition: trigger
id: leaving
- condition: state
entity_id: cover.anne
state: "open"
sequence:
- service: cover.close_cover
target:
entity_id: cover.anne
- service: notify.mobile_app_clausiphone15
data:
message: "Garage closed (departure detected)"
mode: single