diff --git a/include/automations/open_garage_when_car_arrives.yaml b/include/automations/open_garage_when_car_arrives.yaml index 0ad832b..a75c345 100644 --- a/include/automations/open_garage_when_car_arrives.yaml +++ b/include/automations/open_garage_when_car_arrives.yaml @@ -42,7 +42,7 @@ data: message: "Garage opened (arrival by car)" - # LUK (uændret logik) + # LUK (kun hvis bil er aktiv) - conditions: - condition: trigger id: leaving @@ -51,13 +51,18 @@ entity_id: cover.anne state: "open" + - condition: template + value_template: > + {{ state_attr('device_tracker.snowywhite_location_tracker', 'speed') not in [None, 'unknown'] }} + sequence: + - delay: "00:00:20" # giver tid til at du faktisk er kørt ud + - service: cover.close_cover target: entity_id: cover.anne - service: notify.mobile_app_clausiphone15 data: - message: "Garage closed (departure detected)" - + message: "Garage closed (departure by car)" mode: single