-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Actionable Persistent Notifications #121689
Actionable Persistent Notifications #121689
Conversation
Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Frontend: home-assistant/frontend#21361 |
I think we need to discuss where this integration is going to, as this is part of core. Including how this would work with things like the new notification entities and how to align with the apps. This might be better fit for an architectural discussion first. ../Frenck |
Opened in architecture (home-assistant/architecture#1110) Closing for now. |
Proposed change
Allow persistent_notifications to have actionable buttons in the same style as the mobile apps.
The syntax is the same/similar as mobile apps, so that if
persistent_notification
is used in a notification group with mobile_apps, the desktop client can also trigger an action response.When mobile apps trigger a response, they send a
mobile_app_notification_action
event, which didn't feel exactly right to use for a desktop client, so I chose to fire apersistent_notification_action
event instead. I'm not sure what's the right choice, as this might make writing an automation to respond to the action slightly more difficult, as it may have to listen for two types of events, instead of justmobile_app_notification_action
.I also considered instead of sending an event, a service call could just be baked into the notification itself, so that the frontend could call that service when it was clicked, but this felt like it might be annoying as the setup would be completely different from how the mobile apps are used. Perhaps in the future this could be extended with optional actions directly defined in the notification (instead of having to write an automation to catch the event), but starting this simple for now.
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: