Change mobile phone and not lose notification settings from old one

Hello,

I have an HA with notifications to my mobile device. I have bought a new mobile which I have added to my HA.

The thing is that now I have to go by hand to change all the notification sending actions to my old iphone 13 and point them to the new iphone 15.

My question is if there isn’t a way to change them all at once? Or generate a service notify that contains the device that notifies and go changing it when I buy new mobile.

for example I have created in notify.yalm an email notification service and within it I could change the destination of the email without having to change each of the atuomatisations.

Could I create in the same file a push notification that always sends it through my phone and so when I change my phone I only have to put here the new one and that’s it?

thanks

The other way to do this rather than renaming all the notification services is to delete your old phone from home assistant. Set up your new phone to have the same name as the old phone then add it to home assistant. It should generate identical entities.

1 Like

I have already found a way to do this, with the option to group services.

I have created a group of services that contains my mobile notification service. And another group of services containing the notification service of my wife’s mobile.

I put the group of services always in my automations and the day I have to change a mobile I only have to go to the code and change it. Only on this site.

In the configuration.yaml file I put this code:

########## Add custom notification systems
notify: !include notify.yaml

And I create the notify.yaml file with this content:

# Notifications via: Push
- platform: group
  name: push_msg_javier
  services:
  - service: mobile_app_javi_fly_iphone_13_pro
  
  
 # Notifications via: Push
- platform: group
  name: push_msg_belen
  services:
  - service: mobile_app_xiaomi_poco_x3_pro
1 Like