Hey all,
I’ve searched the forum and the docs and can’t find what it is I’m doing wrong, so I’m hoping someone here can tell me the obvious thing I’ve missed
My setup is HA 2024.9.0 running as a full install on a raspberry pi 4.
What I’m trying to do is include the name of the trigger which started the automation in a notification I send to my phone, but no matter what I try it always reports as “unknown”. I know to expect this if I manually trigger it, but it’s also reporting “unknown” when one of the triggers starts it.
This is what I’ve got at the moment - no errors are reported in the logs.
Sidenote: I know this is overly complex, my next job is to simplify it
alias: Detect arriving home v2
description: ""
trigger:
- platform: template
value_template: >-
{{ states('binary_sensor.arriving_on_foot') and
states('sensor.distance')|float < 1.5 }}
for:
hours: 0
minutes: 2
seconds: 0
id: Walking
- platform: template
value_template: >-
{{ states('binary_sensor.arriving_by_bike') and
states('sensor.distance')|float < 6 }}
for:
hours: 0
minutes: 3
seconds: 0
id: Riding
- platform: template
value_template: >-
{{ states('binary_sensor.arriving_by_car') and
states('sensor.distance')|float < 35 }}
for:
hours: 0
minutes: 5
seconds: 0
id: Driving
condition:
- condition: not
conditions:
- condition: zone
entity_id: person.myname
zone: zone.home
action:
- sequence:
- action: notify.mobile_app_my_s_s22
metadata: {}
data_template:
title: V2 Coming home triggered
message: >-
Trigger was {{states('trigger.id')}}. Speed was
{{states('sensor.speed_towards_home')}} mph and distance was
{{states('sensor.distance')}} miles.
- action: input_boolean.turn_on
target:
entity_id:
- input_boolean.coming_home_v2
data: {}
- wait_for_trigger:
- platform: zone
entity_id: person.myname
zone: zone.home
event: enter
continue_on_timeout: true
timeout:
hours: 0
minutes: 35
seconds: 0
milliseconds: 0
- metadata: {}
data: {}
action: input_boolean.turn_off
target:
entity_id: input_boolean.coming_home_v2
mode: single
trace:
stored_traces: 20