Dynamic Notification for Automation (easily change which device to send the notification to)

One thing that comes around every couple of years is… Buying a new mobile phone.
A lot of my automations are set up to notify my specific phone…

service: notify.mobile_app_jj_s21ultra
data:

I thought of two solutions, however, appears HA only has one built in…

  1. A multiple select - selecting multiple devices will send notifications to those
  2. A drop down menu - to select the specific device you want to send the notification to

Question is - How can I ‘future proof’ so when I get a new device in the future, I won’t need to edit all my automations.

So I created this helper

input_select.jj_notifications_device_select

But now I’m thinking, I’ll need to create a some kind of sensor to convert the drop down, into the actual message… OR rename them to exactly the same as the service?

Samsung Galaxy S9+ (SM-G965F) =

service: notify.mobile_app_sm_g965f
data:

Samsung Galaxy S21 Ultra (SM-G998B) =

service: notify.mobile_app_jj_s21ultra
data:

Samsung Galaxy Fold4 (SM-F936B) =

service: notify.mobile_app_sm_f936b
data:

Do you really like the model number so much? Why not just rename the phone in the companion app to your name?
When you replace the phone you name the new phone to your name and all automations will just work.

1 Like

I see what you mean.
I could just label as my device.

But the option to select would be useful.

So I tried this, which worked but the Input Select kept breaking (don’t know why!)

I had to change the options to the service lists.

-notify.mobile_app_sm_f936b
-notify.mobile_app_jj_s21ultra
-notify.mobile_app_sm_g965f

service: '{{states(''input_select.jj_device'') }}'
data:
  message: '{{states(''input_text.jj_nofification'') }}'

Any thoughts if this’ll work?

Update.
It works, if the Input Select holds up!

3 Likes