From 15130cd217e6760faae32b8f2a7ee49042c2b021 Mon Sep 17 00:00:00 2001 From: Carlo Costanzo Date: Mon, 21 Jul 2025 14:13:47 -0400 Subject: [PATCH] Refactor garage.yaml automation to enhance notifications for garage door operations. Removed unnecessary conditions and added functionality to track the last person home, updating notification details and camera entity for improved monitoring. --- config/packages/garadget.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/config/packages/garadget.yaml b/config/packages/garadget.yaml index 7abe11f5..6819ac52 100755 --- a/config/packages/garadget.yaml +++ b/config/packages/garadget.yaml @@ -79,10 +79,6 @@ group: - cover.large_garage_door - cover.small_garage_door -###################################################################### -## Send a notification to anyone coming home asking if they want to open the garage door. -###################################################################### - automation: ###################################################################### @@ -100,11 +96,6 @@ automation: from: 'not_home' to: 'home' condition: - # Only if the person has been away for at least 60 minutes - - condition: template - value_template: > - {{ (as_timestamp(now()) - as_timestamp(trigger.from_state.last_changed)) > 3600 }} - # Garage door must be closed - condition: state entity_id: cover.large_garage_door state: 'closed' @@ -115,13 +106,22 @@ automation: - service: cover.open_cover target: entity_id: cover.large_garage_door + - service: input_text.set_value + target: + entity_id: input_text.last_person_home + data: + value: "{{ trigger.to_state.entity_id.split('.')[1] }}" - service: script.notify_engine data: who: 'parents' value1: "Large Garage has been auto-opened for {{ states('input_text.last_person_home') }}." title: 'Garage Auto-Opened' group: 'Welcome_Home' - camera_entity: camera.frontdoorbell + camera_entity: camera.garagecam + +###################################################################### +## Send a notification to anyone coming home asking if they want to open the garage door. +###################################################################### - alias: 'Garage Helper' id: 365adc21-5e96-4e78-9e94-089901a29430