iOS 10 adds attachments to notifications. An attachment is an image, video, or audio file which is downloaded to the device when a notification is received and shown alongside the notification. A thumbnail is shown when the notification is not expanded. The full size attachment is shown when the notification is expanded.
- alias: Notify iOS app trigger: ... action: service: notify.ios_robbies_iphone_7_plus data: message: "Something happened at home!" data: attachment: url: "https://github.com/home-assistant/home-assistant-assets/blob/master/logo-round-192x192.png?raw=true" content-type: png hide-thumbnail: false
- The thumbnail of the notification will be the media at the
- The notification content is the media at the
- Attachment can be used with custom push notification categories.
An unexpanded push notification with an attachment.
The same notification but expanded to show the full size attachment
If the attachment does not appear please ensure it is in one of the following formats:
Maximum file size: 5 MB
Allowed Formats: AIFF, WAV, MP3, MPEG4 Audio
Maximum file size: 10 MB
Allowed Formats: JPEG, GIF, PNG
Maximum file size: 50 MB
Allowed Formats: MPEG, MPEG2, MPEG4, AVI
- url (Required): The URL of content to use as the attachment. This URL must be accessible from the Internet, or the receiving device must be on the same network as the hosted content.
- content-type (Optional): By default, the extension of the URL will be checked to determine the filetype. If there is no extension/it can’t be determined you can manually provide a file extension.
hide-thumbnail (Optional): If set to
truethe thumbnail will not show on the notification. The content will only be viewable by expanding.