Replacing a device/ entity that shows offline

New to HA. I added a Denon receiver using the Denon integration to HA. When I added it, the Denon had a dynamic IP assigned by DHCP. A few days later I changed my mind and for some reason I assigned it a static IP. Different from the automatically assigned one. The Denon showed offline and not reachable etc in all the places in HA. So I went into the entities list and deleted the offline one and re added it using the new static IP and it has somehow re attached itself to all the scripts it was a part of.

I presume this happened because the re addition somehow gave the device the same entity ID and also same device name but I am not clear which of the 2 actually determined its fate. Can someone help me understand this so that I know what to do in the future in such a situation.

Secondly, lets say I was to replace the Denon with another brand like Yamaha. In that case what happens to the various scripts etc? Will they all have to be re created?

Entity_ id is used to tie device to automation, ui, etc

If you replace with another device/brand, you should only need to change the entity_id of new device to match old.

I don’t use the generic/generated entity ifd for this reason. Instead I use my own specific naming like

For media players I use naming like; media_player.receiver1 or media_ player.roku1.
I found that it I moved media players around or replaced them often enough that location naming was confusing

For other devices I specify by location
Light. Living_room

1 Like