Repository navigation
Notify a person instead of their devices #1552
Replies: 2 comments
|
Possible enhancement: conditional notification targets per person. I've tried something like that a few years back home-assistant/core#91939 |
|
I maintain Supernotify, a Marketplace integration that routes notifications to people across mobile push, email, TTS, chimes and so on. It already solves this problem from the integration side, has been around for a couple of years, so here is some input from that angle. Overall I'm 👍 on this proposal. 1. Allow any notify entity in 2. Expand persons only one level deep, and say so.
3. Don't fail the whole call for one person without notify entities. 4. Keep the 5. Keep core simple; integrations can add conditional routing. 6. Implementation choice. Related, for the follow-up on companion-app options: |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Context
Automations often need to notify a specific person, but Home Assistant has no concept of it. A person is linked to a user and to device trackers, but not to the ways that person can be reached. Today users do one of the following:
notify.mobile_app_annas_phonein every automation, and update all of them when the phone is replaced.Most of the information is already there. The
mobile_appintegration provides both thedevice_trackerand thenotifyentity of a phone on the same device, and that device tracker is usually already assigned to the person.Proposal
1. Link notify entities to a person
Add an optional
notify_entitieslist to the person configuration, next todevice_trackers:notify_entitiesstate attribute, excluded from the recorder likedevice_trackers.2. Accept persons as a target in
notify.send_messageThe notification action is where users look when they want to send a notification, so persons should be selectable there rather than through a new
person.*action.notify.send_messageinservices.yamlallows bothdomain: notifyanddomain: person, so the target picker in the automation editor lists persons.ServiceValidationErrorwith a clear message, instead of silently doing nothing.Example:
Implementation options for the expansion
notify.send_messageis a plain entity service today. Entity services only act on entities of their own domain, so aperson.*target is silently dropped. There are two ways to change that:media_playerfor TTS, but it is a larger change to a core helper.I lean towards A, and moving to B if a second use case shows up.
Alternatives considered
person.send_messageaction. Easy to build, but it sits under "Person" in the action picker, separate from the other notification actions, and users wouldn't find it when they want to send a notification.Consequences
notify.send_messagetargets can containperson.*entities.notify.<service>actions cannot be linked, which gives integrations another reason to migrate to notify entities.Community requests
This discussion was drafted with the help of AI (Claude Code).
All reactions