-
Notifications
You must be signed in to change notification settings - Fork 286
Notification Component
finity69x2 edited this page Mar 13, 2019
·
19 revisions
Minimum Version: 1.2.0
The notify component deprecates media_player.alexa_tts
and conforms to Home Assistant notifications.
notify:
- platform: alexa_media
name: alexa_media
The component supports three types of notifications as supported by the Alexa App:
-
TTS - This is the older
media_player.alexa_tts
functionality. Alexa will speak using Alexa'sSimon says
skill and will not sync between devices. This does not work with an Alexa Whole House Audio group (WHA). - Announce - This functionality will result in a beep prior to speaking. It can also allow display on Echo Shows/Spots (currently untested). Speech will sync across multiple devices and WHA groups should work.
- Mobile Push - This will send a Mobile Push to any Alexa Apps linked to the target Alexa device.
Use the notify.alexa_media
service.
The following args are supported in the Service Data:
- "message:" - The message to send. (Required)
- "title:" - The title to display. Only works for Announce and Mobile Push. (Optional)
- "data:type:" - The type of notification. [tts, announce, push] (Required)
- "data:method:" - For Announce only, controls whether the announcement should be spoken, displayed, or both. [speak, show, all] (Optional)
- "target:" - The target Alexa devices. This can be the Friendly Name, Serial Number, entity_id, or Home Assistant Group. (Required) Warning: Mobile Push using groups will result in a push from every Echo device to every Alexa App.
{
"message":"test",
"data":{"type":"tts"},
"target":["group.alexa", "Guest Room", "media_player.kitchen", "serialNumber"]
}
{
"message":"test",
"title":"My title for Echo show",
"data":{"type":"announce", "method":"all"},
"target":["Guest Room", "media_player.kitchen", "serialNumber"]
}
{
"message":"test",
"title":"My title",
"data":{"type":"push"},
"target":["Guest Room", "media_player.kitchen", "serialNumber"]
}
This is an example of how to use this service in an automation using the "announce" type (script usage would be similar):
- alias: Notification Test Weekly TTS
initial_state: 'on'
trigger:
platform: time
at: '12:15:00'
condition:
condition: time
weekday:
- wed
action:
- service: notify.alexa_media
data:
target:
- media_player.computer_room_dot
- media_player.kitchen_dot
#title: "My title for Echo show"
data:
type: announce
#method: all
message: "This is a weekly test of the announcing system."