-
Notifications
You must be signed in to change notification settings - Fork 455
Add custom notification icons for automations #4672
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
base: main
Are you sure you want to change the base?
Changes from all commits
7ccd851
8937acb
2178307
1b7f5d8
f015944
0273aed
5a0c9e2
f18784e
09612be
bde999e
3c833fb
db26f5b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "aps": { | ||
| "alert": { | ||
| "title": "Dishwasher", | ||
| "body": "Cycle complete." | ||
| }, | ||
| "sound": "default", | ||
| "category": "notification", | ||
| "mutable-content": 1 | ||
| }, | ||
| "notification_icon": "mdi:dishwasher", | ||
| "color": "#4CAF50", | ||
| "webhook_id": "REPLACE_WITH_YOUR_WEBHOOK_ID" | ||
| } |
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this used for unit tests or just left behind?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, this fixture is used. NotificationParserLegacyTests.testAllCases iterates all JSON files in notification_test_cases.bundle, including notification_icon.json. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| { | ||
| "input": { | ||
| "message": "test", | ||
| "title": "Phone", | ||
| "data": { | ||
| "notification_icon": "mdi:cellphone", | ||
| "notification_icon_color": "#FFFFFF", | ||
| "color": "#03A9F4" | ||
| }, | ||
| "registration_info": { | ||
| "app_id": "io.robbie.HomeAssistant.dev", | ||
| "os_version": "10.15", | ||
| "app_version": "2021.5" | ||
| } | ||
| }, | ||
| "rate_limit": true, | ||
| "headers": { | ||
| "apns-push-type": "alert" | ||
| }, | ||
| "payload": { | ||
| "aps": { | ||
| "alert": { | ||
| "body": "test", | ||
| "title": "Phone" | ||
| }, | ||
| "mutable-content": true, | ||
| "sound": "default" | ||
| }, | ||
| "color": "#03A9F4", | ||
| "notification_icon": "mdi:cellphone", | ||
| "notification_icon_color": "#FFFFFF" | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In theory Apple can reject that because this was meant for messaging apps, have you seen non-messaging apps using it? I'm not against trying to get approved, just a heads up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked into this and I agree there is some App Review risk here. Apple’s docs frame Communication Notifications around direct calls/messages and sender participants, not generic app notifications.
I found some App Store apps outside pure messaging that use this, for example Spooky AI uses Communication Notifications for agent profile pictures, and Artemis Learning uses them for course conversations. But both still frame the notification as communication/conversation-like, so they are not a perfect guarantee for Home Assistant automation notifications.
I’m okay trying this if we’re comfortable with that risk.