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) and custom icons is supported too. Icons are essentially the same as images (any image format supported by Android TV is supported), but are displayed small and to the left of the notification whereas images are large and above the notification.
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.
Prerequisites
Make sure the app on your TV has the following permissions enabled:
- Notification access
- Display over other apps
On some TVs, opening the app and following its setup wizard will prompt you to grant these permissions. You might need to restart your TV after changing them.
Configuration
To add the Notifications for Android TV / Fire TV service to your Home Assistant instance, use this My button:
Manual configuration steps
If the above My button doesn’t work, you can also perform the following steps manually:
-
Browse to your Home Assistant instance.
-
In the bottom right corner, select the
Add Integration button. -
From the list, select Notifications for Android TV / Fire TV.
-
Follow the instructions on screen to complete the setup.
Sending notifications
The Notifications for Android TV / Fire TV integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] adds a notify entityAn entity represents a sensor, actor, or function in Home Assistant. Entities are used to monitor physical properties or to control other entities. An entity is usually part of a device or a service. [Learn more] for each configured TV, such as notify.my_android_tv. To show a notification on your TV, use the Send a notification message (notify.send_message) actionActions are used in several places in Home Assistant. As part of a script or automation, actions define what is going to happen once a trigger is activated. In scripts, an action is called sequence. [Learn more] and select your TV notify entity as the target.
You can send a basic message, or add images and icons for camera snapshots, reminders, and status updates.
To send a notification from an automation or a script:
- Go to Settings > Automations & scenes.
- Open an existing automation or script, or select Create automation > Create new automation.
- If you’re setting up a new automation, add a trigger in the When section. Scripts don’t need a trigger. They run when something else calls them.
- In the Then do section, select Add action.
- Search for and select Send a notification message.
- Under Targets, select the notify entity for your TV.
- Enter the Message and set any other options.
- Select Save.
Example YAML configuration
action: notify.send_message
target:
entity_id: notify.my_tv
data:
title: "Just a reminder"
message: "You are awesome!"
Notification data options
The following options are available when using the legacy TV notify action notify.my_android_tv. These options are not supported by notify.send_message.
In YAML, add these options under the nested data field:
action: notify.my_android_tv
data:
message: "You are awesome!"
data:
duration: 10
Configuration Variables
The duration in seconds for which the notification is displayed.
The notification position, one of bottom-right, bottom-left, top-right, top-left, or center.
The notification color, one of grey, black, indigo, green, red, cyan, teal, amber, or pink.
The notification transparency, one of 0%, 25%, 50%, 75%, or 100%.
Set to true to make the notification interactive so it can be dismissed or selected to display more details.
Image upload settings. Provide either url or path. If you set username, password, or auth, you must also set url.
For image and icon, use these nested settings:
Local image and icon paths are validated against allowlist_external_dirs in configuration.yamlThe configuration.yaml file is the main configuration file for Home Assistant. It lists the integrations to be loaded and their specific configurations. In some cases, the configuration needs to be edited manually directly in the configuration.yaml file. Most integrations can be configured in the UI. [Learn more].
Automation examples
These examples show how to use the TV notify entity in automations. Replace the example entity IDs with the ones from your Home Assistant instance.
Automation: show a doorbell notification
Show a notification on the TV when the doorbell detects motion.
- Trigger: State, doorbell motion changes to detected
-
Action: Send a notification via
notify.living_room_tv- Message: Someone is at the front door.
-
Data:
- Duration: 4
- Position: bottom-left
Show example YAML
alias: "Show doorbell notification on the TV"
triggers:
- trigger: state
entity_id: binary_sensor.doorbell_motion
to: "on"
actions:
- action: notify.living_room_tv
data:
message: "Someone is at the front door."
data:
duration: 4
position: "bottom-left"