Problem with doubled IOT device hostnames

We accidently created two IOT devices in ESPHome with the same hostname. As result we couldn't reach one of them and had to find a workaround to change this back.