From 9214d3daeafe944a5fe4c130949e3cef14e98840 Mon Sep 17 00:00:00 2001 From: Claus Dethlefsen Date: Sun, 15 Mar 2026 15:35:55 +0100 Subject: [PATCH] =?UTF-8?q?=C3=A5bn=20garage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../open_garage_when_car_arrives.yaml | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 include/automations/open_garage_when_car_arrives.yaml diff --git a/include/automations/open_garage_when_car_arrives.yaml b/include/automations/open_garage_when_car_arrives.yaml new file mode 100644 index 0000000..a1a5c01 --- /dev/null +++ b/include/automations/open_garage_when_car_arrives.yaml @@ -0,0 +1,51 @@ +- 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 +