Door trigger for phone notifications

Is there an easy way (perhaps a blueprint) I can assign a door sensor to notify when opened and closed on the app?

Most of the blueprints I found were very complex with how long opened, etc.

I’m trying to move away from the wyze door sensors (great devices, but I would rather use the zigbee door sensors I have).

I installed Universal Electronics Inc XHS2-UE and made some very basic automations (door open = turn on light, turn close = turn off light), but could never figure out notificaitons.

Many Thanks! :bowing_man:

Hello jenrick,

I think you need no blueprints, because when you know about automations you can use the notify action to send a push notification to the app when a door open or close.
I use this when I am not at home to get a push.

You can use the same automation when a light turns on or off, add an action and select notify.mobile_app_xxxxxxxxx.

Here you can read more about the usage:
Introduction Notification App

I hope this will help you.

This is my automation:

alias: Push Door SZ
description: ""
trigger:
  - device_id: XXXXXXXXXXXXXXXXXXXXXX
    domain: binary_sensor
    entity_id: binary_sensor.sz
    platform: device
    type: opened
condition:
  - condition: or
    conditions:
      - condition: state
        entity_id: person.emanuel
        state: not_home
      - condition: state
        entity_id: person.emanuel
        state: Work
action:
  - data:
      message: The patio door in the sleeping room was opened!
      title: Patio door
      data:
        push:
          sound: MultiwayJoin.caf
    service: notify.mobile_app_iphone_von_XXXXXXXXX
mode: single

Best regards, Emanuel

It would be the same as your lights on off automation but in the action part change it to notify apps. or notify anything for matter eg email.

- alias: 'Send notification when door open'
  trigger:
  - platform: state
    entity_id: binary_sensor.door
    to: "on"
  action:
  - service: notify.mobile_app_<your_device_id_here>
    data:
        message: "Notification text"

the " service: notify.mobile_app_ " is if you have the HA companion app install on your phone and have notication enable otherwise replace the action with any other notification service you have in HA.

email notification

SMTP - Home Assistant (home-assistant.io)

Notifications

Notifications - Home Assistant (home-assistant.io)

I’ve finally found some time to get to this (Still trying to get rid of my wyze sensors), but I did find a blueprint and modified it a little, but for some reason, it doesn’t seem to trigger right off, but if I keep triggering the sensor (on/off) it will start notifying on the app consistently.

Anyone know why? or is there a better way? I went with a blueprint because it allowed me to add sensor a bit easier.

alias: Server Door Notification (Close)
description: ""
use_blueprint:
  path: panhans/entity_state_persistent_norification.yaml
  input:
    sensor_entity:
      - binary_sensor.door_sensor_test_contact
    message: >-
      The {{ trigger.from_state.attributes.friendly_name }} was closed at
      {{now().hour}}:{{now().minute}}.
    title: "{{ trigger.from_state.attributes.friendly_name }} is closed."
    active_state: "off"
    notify_device: xxx