Repository navigation
Structured editor for notify.mobile_app_* data (image, priority, action buttons): where should the schema live? #55717
Unanswered
danielbaercgn
asked this question in
Automations / scripts / scenes
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
When adding a notification action (e.g.
notify.mobile_app_<device>) in the automation/script editor, the UI showsmessage,title,targetand a raw YAML box fordata. Everything that makes a notification useful (image, icon, color, priority / interruption level, group, tag, URL on tap) and everything needed for actionable notifications (theactionslist with button identifiers, titles and URIs) has to be hand-written as nested YAML, and the keys are only documented on companion.home-assistant.io. Users cannot discover them from the editor.Many options exist for only one platform (for example
color,channel,importanceandstickyon Android;subtitleandpush.interruption-levelon iOS), and the same thing is sometimes set with different keys (the URL on tap isurlon iOS andclickActionon Android). None of this is visible in the editor.Example of what a user has to write today (based on the companion docs):
Note the doubled
data:: the action's owndatafield contains the service data, and the app-specific options live in a nesteddata:below it. Handling a press of theALARMbutton then needs a separate trigger on themobile_app_notification_actionevent with that identifier, which users also have to know and write by hand.Idea
Two steps, the second building on the first:
Structured fields for
data: replace the YAML box with a form (image, priority, group, tag, URL, ...) and a list of action buttons.One notification editor with preview:
message,titleand all options in a single editor, grouped (content, appearance, behavior, on tap, action buttons), with platform labels per field and an approximate iOS and Android preview.Both are mockups only, not working code. The field names follow the Companion docs, and the final set and grouping are open for discussion.
Scope
The editor for the
notify.mobile_app_<device>actions ("Send a notification via …"), which are currently the only way to senddataoptions and actionable notifications to the Companion apps. Optionally: helping with the response side (see questions). Not about notification commands (#82358) and not about thenotify.send_messageentity action, which has nodatafield.Related
ntfy.publishexposes an action button list and an icon URL viaobjectselector (multiple: true,fields).Findings in the code (dev, 2026-11-06)
datais a bareselector: object:innotify/services.yaml, so the frontend shows the YAML editor.notify/legacy.pybuilds the description for every action registered through the notify platform (notify.notify,notify.mobile_app_*, all other platforms) from that singlenotifyentry. I found no hook for a platform to provide its own fields.mobile_app/services.yamlis empty.objectselector supportsfieldsandmultiple: false. Nested objects would presumably open as nested dialogs (my reading of the code, untested). Conditional visibility is not forwarded to the object selector's fields.Options
A. Platform-provided schema, ideally reported by the apps (as suggested in #82358) or via a typed
mobile_appaction (as suggested in roadmap #71). Cleanest, and closest to the direction of typed, validated parameters, but needs Core and app changes.B. Shared schema in
notify/services.yaml. Small, but shown for every notify platform and hard-codes app details in Core.C. Frontend special case for Companion-app actions. Needed for the editor with preview (mockup 3) and for nesting, but there is no per-integration hook for service fields today.
Questions
mobile_app_notification_action), or only with building the button list?I would like to work on a prototype and docs once the direction is agreed.
All reactions