Abstract Mobile

I use mobile notification through Node Red and some automation, and I just changed my phone and realized I have to change all the notifications.
Can I abstract the name of the entity?
Like I name haz_mobile: current entity name for my phone.
Then use haz_mobile for all automations.

So when I change my phone, I just change the name in one spot, and all my automations work.

Hello Haze,

You can set a ‘global’ variable as text that you can template into your stuff. You can use a helper for that
Open your Home Assistant instance and show your helper entities.
Or this: Trigger based template sensor to store global variables.
There is also some magic I think if you name the new entity_id exactly the same as the old entity_id that the new one might just work. I haven’t tried that, but heard about it.

why not set the name of your mobile app client itself? such that it doesn’t get a new name each time… that’s part of the purpose of entity id friendly names…

just like if you light.kitchen phyical light breaks and you replace it with a new one, you wouldn’t go and change all your automation to light.kitchen_new… you’d name the new one light.kitchen

1 Like

That’s what I did, but…

I installed the new app
I changed the friendly name to Haz Mobile
I see the device listed is indeed haz_mobile, with all of its entities

I am not able to get it in the drop-down of the Node Red “Edit Call Service Node”.
I restarted Node Red, restarted Home Assistant, still, don’t get it. I get the first device name which was set when I first installed the companion on the new phone.

So everything works on the HA side, but not Node Red yet. Am I missing a step to refresh the Node Red device list?

Not the friendly_name, the entity_id…

1 Like

yeah, what @Sir_Goodenough said… :slight_smile:

2 Likes

ok, changed the name. All device and entities have haz_mobile_…so all works on the HA side.

Restarted HA, Node Red still pulling the old name. No haz_mobile in the drop down of the notification.

Is there something I need to do to get it to refresh on the node red side? I restarted node red also.

i’m switching the category to node-red so that node-red gurus might see this and help out. i don’t use node-red so i don’t know…

1 Like

First deploy any ha node, then check the auto complete again. No? Go into any HA node the server dropdown, there is only one server? Yes, click the edit button next to the server and uncheck the cache autocomplete. deploy and then restart nodered.

1 Like

This is it. worked for me.
For some reason I could not mark it as solution for the thread.

1 Like

Nodered is the red headed step child of the forum and as such we are not allowed to mark threads solved.