I’m attempting to get my VPE to let me know that my garage door has been open for X minutes and ask me if I want to close it. Thus far, I have been able to accomplish the notification, but cannot figure out how to pass specific variables into the start_conversation
action.
I am using the custom integration NotiScript, which basically allows you to wrap a script so that it appears as a notifier to HA. This means that using the alert
integration, I can do the following:
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
notifiers:
- inner_garage_door_open
- kitchen_voice_assistant_prompt
notify:
- name: kitchen_voice_assistant_prompt
platform: notiscript
data: # not sure if these last lines are correct
door: "inner"
elapsed_time: "{{ relative_time(states.cover.garage_door_outer.last_changed) }}"
Then, with a script, I do get a prompt on my VPE telling me the door is open and it will act on my response, however it does not seem to see the {{ variables }}
.
script:
kitchen_voice_assistant_prompt:
sequence:
- action: assist_satellite.start_conversation
metadata: {}
data_template:
start_message: The {{ door }} garage door has been left open for {{ elapsed_time }} minutes. 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
I have no doubt that I’m butchering this, but would appreciate any guidance on it.