sometimes device are drop dead. in that case you need to remove the integration of the device and install a new device, integrate it and move through all the automation, scenarios, scripts etc. that the old device was part of and change it to the new device/entities. it would be great thing if you can go to a dead or unavailable device and tell home assistant: “replace this the device with a new one” while it keeps all the functionality it was involved in.
WTH, if we could make Home Assistant contact the device support directly, get you a new one and notify when it needs to be installed it would be much better
Now being serious this is a great idea with very little efforts to implement:
When detecting a new device if the integration notice you have a “dead” device (a device which is offline) the integrations can ask you if the new device is replacing the offline device and if it does all we need to do is to update the device identifier & unique ids so the new device will replace the old one.
We have a similar flow when a user try to add a device by IP, but device is already detected
I think it’s possible to achieve today.
Just edit the /config/.storage/.core_config_entries and change the unique_id with the new device unique_id which in most cases is the MAC address
But you need to make sure the new device has the same parameters of the old one (such as IP address/credentials/etc
@jafar-atili the storage folder start with a DOT for a reason, of course the user can edit it, but this file should never be edited manually, also it depends on the integration how the unique id is set and I don’t expect users to know how to do it.
I have already helped few people who try to update it manually and left out with a broken file and core that is not loading anymore.