Recently, I changed the name of my smartphone. This led to issues in my Home Assistant setup since notifications in automations were pointing to the common name of the phone where the companion app was installed. Home Assistant was telling me that the notifications could not be send to the target and the automations ended with an error.
To this date, the notification inside an automation was defined as follows:
action: notify.mobile_app_old_name
metadata: {}
data:
title: Title of notification
message: Content
When the smartphone is renamed, the corresponding action has an issue and you need to go through every automation to fix it.
Hence, it is better to use group notifications, but I had issues with the configuration ever since.
After some research on the web I found that other users were also struggling with that feature.
This is now my working configuration:
- Modification of
configuration.yaml:
# add the following line
notify: !include notify.yaml
- Create and modify
notify.yaml:
# custom group for all smartphones
- platform: group
name: notify_smartphones
services:
- service: mobile_app_smartphone1
- service: mobile_app_smartphone2
- Use action
notify_smartphonein automations (can be found in the GUI as well):
action: notify.notify_smartphones
metadata: {}
data:
title: Title of notification
message: Content
Potential changes (new smartphone, changed name, etc.). can be maintained easily in just one action in notify.yaml.
Michael Hülsen