Lost devices after zigbee migration

I was running a TI ZNP coordinator with ZHA. I did a migration to an EZSP coordinator, but then many devices did not work. So I migrated back to ZNP, but still the devices do not work. It seems that the devices are connected to HA (“last seen” time) and the sensor values from zigbee sensors are coming in. But I cannot control lights and switches. When I switch them on, nothing happens. The funny thing is that HA sees if the light is on or off, but its not possible to switch it.
One light I could reanimate by doing a re-configuration. What can I do to get the devices working? (The ceiling lights are extremly hard to reset, so I want to avoid that)
I have backups of the files in .storages (core device and entity registry).
image