I have a few notifications based around zones that let my wife and I know when someone is headed home after picking up the kid, or coming home from work, etc.
One annoyance is when my wife and I are together, say leaving my son’s school, and we both get the notification at the same time, saying “Dad is on the way home from school” and “Mom is on the way home from school”.
Yes, yes home assistant… we know. We’re sitting in the same car. LOL
SO… my question for those smarter than me: how do I write the condition that stops the notifiction from firing if our locations are the same? IE: “Don’t notify if G is in the same zone as J. (and vice versa).”
I suspect that the hard part is the fact that notifications are triggered on leaving a zone… so would the condition have to check that we both left that zone at the same time, some how? Or know that we are close to each other (and that kinda depends on when /where owntracks reported locations)? Am I overthinking this? Or is getting this to be a reliable condition going to be a tough one? Should I just deal with the minor annoyance?
I’m using HA for my automations (no node red). Owntracks & NMAP for presence and Person entities. (Nothing special.)
Here’s my current YAML for one such notification:
alias: Location - G Leaving 50H
description: ""
trigger:
- entity_id: person.g
event: leave
platform: zone
zone: zone.50h
condition:
- after: "09:00:00"
condition: time
action:
- data:
message: G is on the way home.
title: Location alert
service: notify.j
Thanks in advance!