How to rename devices?

I’ve added several devices to my HA instance. Until today i don’t get a smart way of naming them (in means of ID), so i experimented a lot. Still not shure of name them of their type and number (e.g. “zigbee-humid-temp-01”) or location and type (e.g. “climatesensor-livingroom”) or something else… most of the devices will remain on their installed location, especially those flush-mounted ones.

But it seems not so easy to change the name afterwards, because all the collected data and other things are lost then.

It there a way of doing this without any loss?

Only if you are proficient in SQL.

Ideally you would rename the entities right after you add them.