Blueprint Request - Presence Notification

Hi All,

New HA user here and not sure if this is the right location to post in.

I have had a look through the blueprint exchange and tried a search but I cannot seem to find the blueprint I am looking for.

I am looking for a blueprint or example automation where you can add multiple device_tracker entities and have a push notification sent to a specific device when any of the device trackers enter or leave whatever zones are specified.

As I am only in first first 2 weeks of using HA I don’t feel I have the relevant knowledge to build or achieve this, would appreciate any help or guidance in building it myself or even if someone has something they are already using that does similar that the can share as an example, I would be happy to try and reverse engineer it and change\amend it to my needs!

Not a proper blueprint, but here is the automation I use:

- alias: Zone Change Notification
  id: "15"
  description: Sends out a notification when someone changes zones.
  trigger:
    - platform: state
      entity_id:
        - person.one
        - person.two
  variables:
    fromState: >
      {{ trigger.from_state.state }}
    toState: >
      {{ trigger.to_state.state }}
    personName: >
      {{ state_attr(trigger.entity_id, 'friendly_name') }}
  condition:
    - condition: template
      value_template: >
        {{toState is not none and
          fromState is not none and
          toState != fromState}}
  action:
    - service: >
        notify.ALL_X_{{ personName.upper() }}
      data:
        message: >
          {{ personName }} has
          {% if fromState != 'not_home' %}left {{ fromState }}{% endif %}
          {% if fromState != 'not_home' and toState != 'not_home' %}and{% endif %}
          {% if toState != 'not_home' %}entered {{toState}}{% endif %}
        title: "{{personName}} Location Update"
  mode: single

This one is made for people, hence the person entities. Also, I have notify groups set up that are all the devices I want to notify except for the person who triggered the automation, which is how the notify service works.

2 Likes

Thanks will give it a go!