Notifications for Android TV / Fire TV


Notification integration for Notifications for Android TV and Notifications for Fire TV. You can use this integration to send notifications to your Android TV device. An overlay with the message content will appear for a configurable amount of seconds and then disappear 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 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.

Configuration

Adding Notifications for Android TV / Fire TV to your Home Assistant instance can be done via the user interface, by using this My button:

Manual configuration steps

Services

The following options can be specified inside the data field for the notify service call:

Service notify.[name_of_your_tv]

Configuration Variables

duration integer

The duration in seconds for which the notification will be displayed.

fontsize string

Has to be one of: small, medium, large or max.

position string

Has to be one of: bottom-right, bottom-left, top-right, top-left or center.

color string

Has to be one of: grey, black, indigo, green, red, cyan, teal, amber or pink.

transparency string

Has to be one of: 0%, 25%, 50%, 75% or 100%.

timeout integer

The timeout in seconds for trying to send the notification to the device.

interrupt boolean

If set to true, 1, on etc., the notification is interactive and can be dismissed or selected to display more details. Depending on the running app (e.g., Netflix), this may stop playback.

This is a fully customized YAML you can use inside data to test how the final notification will look like:

fontsize: "large"
position: "center"
duration: 2
transparency: "0%"
color: "red"
interrupt: 1

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 and is placed inside file.

Example for posting file from URL:

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:

file:
  path: "/path/to/file.ext"

Please note that path is validated against the allowlist_external_dirs in the configuration.yaml.