Renaming entities should also rename those entities in automations and scripts

This is basically a duplicate of: