Migrating Shellys into HA - some devices rename entities, some not?

Hi folks,

currently i connect all my shellys to my HA. In order to that i also change the names of the devices. Sometime HA offer me the option to chance the entities names as well? Some devices i wasnt able to change the entitie names according to the device name in one step.
In my case the added devices are all Shelly 2.5 with the identical FW.

May you have a idea how to change the entitie names of alle those devices according to their device name? (not manually ;))
Bcs if i change the names of that devices again, i again get the message that the entities names will not be changes.

kind regards

When you add a device directly connected to HASS (as in not through some other bridge integration) their initial device name seems to most often be the model name of the device. The entity names and ids are then based on the device name.

If you add more than one device of the same model at the same time, any device after the first typically gets a number at the end of the device name. In my experience this typically messes up the entity names and ids so that some/all are no longer able to be automatically renamed when the device is.

Try adding only one device, renaming it, then adding the next device.

Sounds like fun to delete 95% of my shelly devices and bring them back in. Strange, that the first device which asked to rename all the entities names automaticilly, was the ~20th :smiley:

Unfortunately after i deleted the device and restarted HA, the entities names of a the deleted (and newly added) device still not rename automatically. Also the correct area for the device was set by default?
So were do i have to delete the device to delte all settings, belonging to the device?

But there are now some new problems.
In the config of the device
HA-ADress.local:8123/config/devices/device/“long ID”
it was possible to change the devices name by clicking on the pen in the upper right corner.
Now the Name field is no more accessible and editable?! And also adding a label or changing the area is not possible, because the actualize button is also not active?!
All devices of all integrations (e.g. also homatice ip) have this problem now…

If i go to the integration of Shelly and rename the devices name by clicking on the 3 dot burger menue of the according device and rename here…
the name in devices overview doenst change accordingly?!
this renameing doesnt belong to the name, which could be given in the device overview?!

Where did i go wrong?..

kind regards

Shelly devices come with unique names in my experience. It’s not just model name, there’s some serial ID in there as well.

And the device name can be first changed in the device itself (through its web server or the shelly app). In theory HA should use that name when adding the device. But I’m not 100% sure it works every time.

1 Like

There’s a difference between device name and the name of the configuration entry (confusingly also called device).

To change the device name, open the device page, and use the pen icon in the top right.

Changing the names in the integration page will not affect the actual device name and its entities.

Ah, one more confusing thing: the default entity name displayed in the device page (and maybe in the dashboard? Not sure) is not the full name. Click on the entity and you will see the full name, which is composed of the device name plus the default name for entity.

For example a switch entity of a device called Kitchen light would have a name Kitchen light switch 0. In the device page it would be shown as Switch 0. The entity id would be switch.kitchen_light_switch_0.

Hi folks.
RTFM to myself…

Entity naming (generation 1)

The integration uses Device Name to name its entities if the device has only one relay or no relays at all.

The integration uses the following strategy to name its entities if the device has more than one relay:

  • If Device Name or Channel Name is set in the device, the integration will use them to generate the entities’ name.
  • If channel names are set, they will be used in the entity names. The device name will not be used.
  • If only the device name is set, and the device has multiple channels, the channel number will be appended to the entity name (e.g., Channel 2).
  • In case device name and channel names are not set, the entity name will be generated by the Device Type, Device ID and Channel Number.

Examples:

Device Name Channel Name Entity Name
Not set Not Set shellyswitch25-ABC123 Channel 1
Not set Kids Room Bulb Kids Room Bulb
Kitchen Not Set Kitchen Channel 1
Bedroom Round Bulb Round Bulb

I also “solved” the problem with not editabled device settings…
by installing the backup from last night :wink:

kind regards to all.