Ble with multiple devices

So I would want to build an application that can interface with multiple ble devices, say smart lamps or other smart appliances, all of which are bearing the same characteristics and services, how would you go about it?
My idea was that the user could map various identical devices by assigning to each of them an unique name or number, to do that I would first need the user to scan for devices than for him/her to click on the device name and assign an unique one that then would be transmitted to the device so that each time user tries to connect to device the device sends the name and application returns error if the name provided by the device is not the same as the one assigned by the user.
Would you say that’s an ok solution or is there a more efficient one?