Replacing devices

I am replacing several zwave devices with sonoff basics. Is there an easy way to do this so that I do not have to manually update each entry in various yaml files and node-red flows? Currently I’m using the switch.zwave_### and switch.sonoff_### naming convention, where ### is the device number. Was there a better naming convention that I should have used to prevent this from happening?