Thanks for your suggestion. I tried removing from ZHA and re-pairing with same name, but as soon as the device is removed, the automations are broken, i.e. I need to manually select that device again in every occurrence.
Am I doing something wrong?
[update]
Aah wait something else is going on. I am also renaming the devices before removing from ZHA, but the entities are not being renamed in this process, even when I toggle “Do you also want to rename the entity IDs of your entities?”
[update2]
Wrong again. The entities are in fact renamed correctly, but automations that reference those entities are not updated.