When I first read the blog post for 2025.4, I was inspired to get my VPE to prompt me to close an open garage door as was detailed in the post. It took me a while, but I finally got it to work.
My solution includes the use of alerts, notifications, scripts, automations and a custom component called NotiScript that allows you to call a script as a notification. Essentially, 5m after either of my garage doors is left open, I get a notification on my phone prompting me to close the door AND my VPE alerts me to the open door and prompts me to close it – we truly do live in the future!
My .yaml is found below. My only hope is that in the future we will not require the use of a cloud-based conversation agent to do this.
alert:
inner_garage_door:
name: Inner garage door open
message: "Door has been open for {{ relative_time(states.cover.garage_door_inner.last_changed) }}"
entity_id: cover.garage_door_inner
state: 'open'
repeat:
- 5
- 10
- 15
- 30
- 60
can_acknowledge: true
skip_first: true
data:
door: "inner"
notifiers:
- inner_garage_door_open
- kitchen_voice_assistant_prompt
notify:
- name: inner_garage_door_open
platform: group
services:
- service: mobile_app_iphone
data:
title: 'Inner garage door open'
data:
tag: "inner_garage_door_open" # used for grouping
actions:
- title: "Close garage door"
action: "CLOSE_INNER_GARAGE_DOOR"
destructive: true
- title: "Cancel further alerts"
action: "CANCEL_INNER_GARAGE_DOOR_ALERT"
- name: kitchen_voice_assistant_prompt
platform: notiscript
script:
kitchen_voice_assistant_prompt:
sequence:
- action: assist_satellite.start_conversation
metadata: {}
data_template:
start_message: "The {{ data.door }} garage door has been open for {{ relative_time(states.cover.garage_door_outer.last_changed) }}. Would you like me to close it?"
preannounce: true
extra_system_prompt: >-
The user has left a garage door open and is being asked if they would
like to close it.
target:
entity_id: assist_satellite.kitchen_vpe_assist_satellite
automation:
- alias: iOS app notification inner garage door
initial_state: True
trigger:
platform: event
event_type: ios.notification_action_fired
event_data:
actionName: CLOSE_INNER_GARAGE_DOOR
action:
service: cover.close_cover
data: {}
target:
entity_id: cover.garage_door_inner
- alias: iOS app cancel inner garage door alert
trigger:
platform: event
event_type: ios.notification_action_fired
event_data:
actionName: CANCEL_INNER_GARAGE_DOOR_ALERT
action:
service: alert.turn_off
target:
entity_id: alert.inner_garage_door
- alias: iOS app clear notification inner garage door
trigger:
- entity_id: cover.garage_door_inner
platform: state
to: 'closed'
action:
- service: notify.mobile_app_shamuss_iphone
data:
message: "clear_notification"
data:
tag: "inner_garage_door_open"