diff --git a/source/_components/notify.nfandroidtv.markdown b/source/_components/notify.nfandroidtv.markdown index e1bf8659ba8..6ec1639edb2 100644 --- a/source/_components/notify.nfandroidtv.markdown +++ b/source/_components/notify.nfandroidtv.markdown @@ -10,15 +10,14 @@ footer: true logo: nfandroidtv.png ha_category: Notifications ha_release: 0.32 -ha_iot_class: "Local Polling" --- -Notification platform for [Notifications for Android TV](https://play.google.com/store/apps/details?id=de.cyberdream.androidtv.notifications.google) and [Notifications for FireTV](https://play.google.com/store/apps/details?id=de.cyberdream.firenotifications.google). +Notification platform for [Notifications for Android TV](https://play.google.com/store/apps/details?id=de.cyberdream.androidtv.notifications.google) and [Notifications for FireTV](https://play.google.com/store/apps/details?id=de.cyberdream.firenotifications.google). You can use this plarform to send notifications to your Android TV device. An overlay with the message content will appear for a configurable amount of seconds and then disapper again. Sending images (e.g. security cam) is supported too. The notifications are in the global scope of your Android TV device. They will be displayed regardless of which application is running. -When setting this up be aware, that there are two apps: one for your smartphone to send notifications (not required for this platform) and one for your Android TV device to receive the notifications. The app available in the store of your target device is the one that is needed to display notifications sent from Home Assistant. The In-App purchases only apply to the client for Android smartphones, so there isn't any limit when pushing notifications from Home Assistant. +When setting this up be aware, that there are two apps: one for your smartphone to send notifications (not required for this platform) and one for your Android TV device to receive the notifications. The app available in the store of your Android TV device is the one that is needed to display notifications sent from Home Assistant. The In-App purchases only apply to the client for Android smartphones, so there isn't any limit when pushing notifications from Home Assistant. To enable the notification platform, add the following to your `configuration.yaml` file: @@ -35,6 +34,7 @@ Configuration variables: - **name** (*Optional*): Setting the optional parameter `name` allows multiple notifiers to be created. The default value is `notify`. The notifier will bind to the service `notify.NOTIFIER_NAME`. - **host** (*Required*): IP address of the Android TV / FireTV device. - **duration** (*Optional*): The duration in seconds for which the notification will be displayed. Default is 5 seconds. +- **fontsize** (*Optional*): Has to be one of: small, medium (default), large, max - **position** (*Optional*): Has to be one of: bottom-right (default), bottom-left, top-right, top-left, center - **color** (*Optional*): Has to be one of: grey (default), black, indigo, green, red, cyan, teal, amber, pink - **transparency** (*Optional*): Has to be one of: 0%, 25% (default), 50%, 75%, 100% @@ -48,6 +48,7 @@ This is a fully customized JSON you can use to test how the final notification w "message": "Messagetext", "title": "My Notification", "data":{ + "fontsize": "large", "position":"center", "duration":2, "transparency":"0%", @@ -56,3 +57,48 @@ This is a fully customized JSON you can use to test how the final notification w } } ``` + +### {% linkable_title Service data for sending images %} + +The following attributes can be placed inside `data` to send images. + +| Service data attribute | Optional | Description | +| ---------------------- | -------- | ----------- | +| `file` | yes | Groups the attributes for file upload. If present, either `url` or `path` have to be provided. +| `path ` | yes | Local path of an image file. Is placed inside `file`. +| `url` | yes | URL of an image file. Is placed inside `file`. +| `username` | yes | Username if the url requires authentication. Is placed inside `file`. +| `password` | yes | Password if the url requires authentication. Is placed inside `file`. +| `auth` | yes | If set to `digest` HTTP-Digest-Authentication is used. If missing, HTTP-BASIC-Authentication is used. Is placed inside `file`. + +Example for posting file from URL: + +```json +{ + "message":"Messagetext", + "title":"My Notification", + "data":{ + "file":{ + "url":"http://[url to image file]", + "username":"optional user, if necessary", + "password":"optional password, if necessary", + "auth":"digest" + } + } +} +``` + +Example for posting file from local path: + +```json +{ + "message":"Messagetext", + "title":"My Notification", + "data":{ + "file":{ + "path":"/path/to/file.ext" + } + } +} +``` +Please note that `path` is validated against the `whitelist_external_dirs` in the `configuration.yaml`.