Skip to content

Add support for UnifiedPush notifications - #5261

Draft
lone-faerie wants to merge 16 commits into
home-assistant:mainfrom
lone-faerie:feature/unifiedpush
Draft

Add support for UnifiedPush notifications#5261
lone-faerie wants to merge 16 commits into
home-assistant:mainfrom
lone-faerie:feature/unifiedpush

Conversation

@lone-faerie

@lone-faerie lone-faerie commented May 1, 2025

Copy link
Copy Markdown

Summary

Adds support for using UnifiedPush as the source for push notifications. This allows both the full and minimal flavors to receive push notifications without a persistent websocket connection and without reliance on Google's Firebase Cloud Messaging. On launch, UnifiedPush is preferred if a distributor is available, otherwise the full flavor falls back to FCM. A setting has also been added to allow the user to manually select the UnifiedPush distributor to use.

Checklist

  • New or updated tests have been added to cover the changes following the testing guidelines.
  • The code follows the project's code style and best_practices.
  • The changes have been thoroughly tested, and edge cases have been considered.
  • Changes are backward compatible whenever feasible. Any breaking changes are documented in the changelog for users and/or in the code for developers depending on the relevance.

Screenshots

UnifiedPush Setting
Distributor Selection

Link to pull request in documentation repositories

User Documentation: home-assistant/companion.home-assistant#1202

Any other notes

#3174 mentions Home Assistant Core needing to add support before this would work. I'm not sure if it's changed since then, but in my tests UnifiedPush works with Core as-is. A small change to Core would be needed to support encrypting the notifications, but that isn't necessary for UnifiedPush to work.

@home-assistant home-assistant Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @lone-faerie

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@home-assistant

home-assistant Bot commented May 1, 2025

Copy link
Copy Markdown

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@jpelgrom

jpelgrom commented May 2, 2025

Copy link
Copy Markdown
Member

While this works to get started (and is quite similar in some ways to my proof of concept from last year), I feel like there should be a generic interface here. This approach doesn't scale and the push provider can change without the user noticing.

@lone-faerie

Copy link
Copy Markdown
Author

The push provider should only change during onboarding or if the user uninstalls the distributor app. A generic interface does feel like the more proper approach though, perhaps something like the SensorManager. UnifiedPush also has the ability to handle FCM on it's own, though that would require a bit of backend work since it needs a gateway similar to the current cloud functions.

@TimoPtr

TimoPtr commented May 12, 2025

Copy link
Copy Markdown
Member

Since you are changing the notification, you will also need two others PR in the developer documentation.

@Rudd-O Rudd-O mentioned this pull request Dec 28, 2025
@Rudd-O

Rudd-O commented Dec 28, 2025

Copy link
Copy Markdown

@lone-faerie I'm willing to fund you finishing this work, and doing whatever the Companion / Core devs want done to get this in.

Please quote me and let's get the details straightened out.

@attila-lendvai

Copy link
Copy Markdown

I'm willing to fund you finishing this work

@Rudd-O i'm also willing to chip in. maybe we could set up some bounty somewhere and advertise it?

is anyone here experienced with an opensource bounty solution that could work here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants