-
Notifications
You must be signed in to change notification settings - Fork 17
Home
Welcome to the Centro Notifiche
wiki. Please feel free to make any changes you want and put it out.
Notification Center is a package for Home Assistant, which works together with the Notifier App in AppDaemon.
It is used to send, in one place, text messages (Telegram, Push...), TTS Google and Alexa, Voip notifications to you and/or your devices such as Pcs, smartphones, pads, etc.
In summary, you send notifications with the script service ( script.my_notify
) via variables.
The script creates an event in Home Assistant, with the name " notifier
" and with all the data set in the variables.
Appdaemon’s Notifier application, which listens to the notifier
event, distributes text, audio,
and persistent notifications on the various devices based on the received data.
The package must be configured with the secret file,
essential to get the right information and avoid continuous changes in case of future updates.
Before installing this package, you must install the following requirements.
-
Example - Click to expand
sensor: - platform: time_date display_options: - "time" - "date" - "date_time" - "date_time_utc" - "date_time_iso" - "time_date" - "time_utc" - "beat"
-
Example - Click to expand
binary_sensor: - platform: workday country: IT workdays: [mon, tue, wed, thu, fri] excludes: [sat, sun, holiday] add_holidays: - "2021-08-31" - "2022-08-31" - "2023-08-31" - "2024-08-31" - "2025-08-31"
-
Packages Folder (Guida HassioHelp)
Example configuration.yaml- Click to expand
homeassistant: packages: !include_dir_named packages
-
Alexa Media Player Custom Component. Only for Alexa device (wiki!)
- Download the last release from the release page.
- Initialize the download by clicking on the "Source code(zip)" link at the bottom of the page.
- Unzip the file you downloaded wherever you prefer.
- Copy the
packages
folder to the Home Assistant configuration folder (usually/config/
). - Compile the secret file with your data.
- Restart Home Assistant.
- Configure your Lovelace GUI. Here some examples and here my configuration in yaml mode.
In the package folder, you will find all the files you need for the Notification Center to work properly.
.
└── addons/
└── backup/
├── config/
│ ├── packages/
│ │ ├── centro_notifiche/
│ │ │ ├── hub_main.yaml
│ │ │ └── hub_alexa.yaml
│ │ │ └── hub_google.yaml
│ │ │ └── hub_build_message.yml # <-- DO NOT MODIFY THE .yml EXTENSION
│ │ │
│ │ └── secret.yaml
│ │
│ └── home-assistant.log
└── share/
└── ssl/
The file 'secrets.yaml' must be created in the folder 'packages'. Here are the entries related to the entities present in the package. How to compile the Secret file
This is the main file needed to create the notifier
event via the my_notify script ( script.my_notify
).
Contains numerous entities, from sensors to calculate the time of day,
to the sensor for DND (Do Not Disturb), to the various switches to control
priority of messages, text, tts, holidays and more.
To know all the package entities, use this jinja code in dev-tools templates - Click to expand
{% for state in states if 'package' in state.attributes -%}
{% if 'centro notifiche' in state.attributes.package|lower %}
- {{ state.entity_id -}}
{% endif %}
{%- endfor %}
Jinja code to show all HubMain entities - Click to expand
{% for state in states if 'package' in state.attributes -%}
{% if 'centro notifiche' in state.attributes.package|lower
and 'main' in state.attributes.version|lower %}
- {{ state.entity_id -}}
{% endif %}
{%- endfor %}
This file contains all the entities used for Alexa. If you don’t have any Amazon Alexa devices, you can delete it, saving useless entities in the system.
Jinja code to show all HubAlexa entities - Click to expand
{% for state in states if 'package' in state.attributes -%}
{% if 'centro notifiche' in state.attributes.package|lower
and 'alexa' in state.attributes.version|lower %}
- {{ state.entity_id -}}
{% endif %}
{%- endfor %}
This file contains all entities used for Google. If you don’t have any Google devices, you can delete it, saving useless entities in the system.
Jinja code to show all HubGoogle entities - Click to expand
{% for state in states if 'package' in state.attributes -%}
{% if 'centro notifiche' in state.attributes.package|lower
and 'google' in state.attributes.version|lower %}
- {{ state.entity_id -}}
{% endif %}
{%- endfor %}
service: script.my_notify
data:
<parameter>
Below the
data:
we will enter all the parameters that relate to our notification, including the actual message, if we do not enter any parameter but only themessage
the notification center will use all the default settings that we have set in the frontend. I'll leave you a list Complete with the parameters and their operationAlways remember that these options override those set by default.
N.B. Valid boolean value can be 1, True, On, Yes or 0, False, Off, No, even in lowercase letters.
Name | Type | Default | Description |
---|---|---|---|
title | string | None | Title for text notifications |
message | string | Greeting | Message to be sent. Including build message template. |
target | - | None | Not yet implemented :-/ |
called_number | string | default | Telephone number for DssVoip or username/number for CallMeBot. |
caption | string | Message | Comment accompanying an image. If missing, message is used. |
html | bool | False | True, format text in HTML instead of markdown. |
image | string | None | The local path of an image to attach to the notification or a url. |
link | string | None | A web address to attach to the text notification. Will not be considered by TTS. |
location | string | None | Send notification only if you are at home (home) or away (not_home). |
no_show | bool | False | True, disables persistent notification. |
notify | bool/string | default | The notify service to send the notification. Multiple notification service is allowed, comma-separated. False not to send. |
priority | bool | False | True, by-pass DND (do not disturb). |
alexa | bool/dict | None | True, enable Alexa and send the main message. Other parameters see below in dictionary mode. |
bool/dict | None | True, enable Google and send the main message. Other parameters see below in dictionary mode. | |
discord | dict | None | All data under Discord. |
mobile | dict | None | All data under Mobile App. |
pushover | dict | None | All data under Pushover. |
telegram | dict | None | All data under Telegram. |
dict | None | All data under Whatsapp addon (whatsapp.send_message). |
Options | Type | Default | Description |
---|---|---|---|
message | string | Main message | You can also use message, overwrites the main message anyway and does not pass to the build message template. |
media_player | string/list | group | entity_id, friendly_name or both, for media player, sensor or group. (comma separated list) |
volume | float | 0.1 | Set the volume to a value between 0 and 1 (e.g. 0.3) |
method | string | all | all, speak. |
type | string | tts | tts, announce, push, dropin_notification or dropin, it's the same. |
title | string | Main title | Title for the push service (not valid for dropin notification). |
push | bool | False | Send a push notification in addition to the tts message. |
wait_time | float | 3.0 | Estimated time to finish the message before moving on to the next. Value expressed in seconds (e.g. -2 or 8). |
ssml | bool | off | By-pass switch SSML. Turn on-off automatic SSML mode. |
audio | string | None | Audio file to play. |
language | string | it-IT | The format is xx-XX (e.g. en-GB) see supported language table. |
rate | float | 100 | Modify the rate of the speech. min value 20 max 200. |
pitch | float | 0.0 | Raise or lower the tone (pitch) of the speech. min value -33.3 max 50. |
ssml_volume | float | 0.0 | Change the volume for the speech. min value -50 max 4.08. |
voice | string | Alexa | Speak the text with the specified Amazon Polly voice. See supported voice-id table. |
whisper | bool | False | Applies a whispering effect to the speech. If true, activate ssml automatically. |
notifier | string | alexa_media | Alexa services. |
media_content_id | string | None | Ex. amzn_sfx_doorbell_chime_01, Alexa. GoodMorning. Play... |
media_content_type | string | None | sound, sequence, image, TUNEIN, AMAZON_MUSIC, SPOTIFY, APPLE_MUSIC... |
mode | bool | False | Useful to use as a switch with templates. |
priority | bool | False | By-pass Alexa switch and dnd. |
event_id | string | None | Alexa Actions custom skill. |
Table - Click to expand
Language | Code | Voice-id |
---|---|---|
Italian | it-IT |
Carla, Giorgio, Bianca |
English US | en-US |
Ivy, Joanna, Joey, Justin, Kendra, Kimberly, Matthew, Salli, |
English Canada | en-CA |
|
English Australia | en-AU |
Nicole, Russell, |
English UK | en-GB |
Amy, Brian, Emma, |
English India | en-IN |
Aditi, Raveena, |
French France | fr-CA |
Chantal, |
French Canada | fr-FR |
Celine, Lea, Mathieu, |
German | de-DE |
Hans, Marlene, Vicki, |
Hindi | hi-IN |
Aditi, |
Japanese | ja-JP |
Mizuki, Takumi, |
Portuguese Brazilian | pt-BR |
Vitoria, Camila, Ricardo, |
Spanish US | es-US |
Penelope, Lupe, Miguel, |
Spanish Spain | es-ES |
Conchita, Enrique, Lucia, |
Spanish Mexico | es-MX |
Mia |
Options | Type | Default | Description |
---|---|---|---|
message | string | Main Message | Alternative message to the main one |
media_player | string/list | selected | entity_id comma separated list. |
volume | float | None | Volume with a value between 0 to 1 (e.g. 0.9) |
media_content_id | float | None | xxxxxxx |
media_content_type | string | None | xxxxxxx |
mode | bool | Optional | Useful to use as a switch with templates. |
priority | bool | False | By-pass Alexa switch and dnd. |
MIT