This improvement works for device delete
Is not not work for driver change with different capabilities, as zigbee thing, zwave thing or zwave device config Mc
You still need to add additional devices in the if and then parts to prevent routine deletion
@nayelyz It would be good to apply this improvement also to device driver changes


