Documentation goes here...
This wasn't designed to be shared, so you'll have to pretend I did a good job of documenting it. ;)
Invoke it with the name or model of the entity you want to remove.
WARNING: this works directly in your .storage directory. That should make you uncomfortable, so make sure to try it on a backup first.
In an effort to be slighlty user-friendly, it will make backups of the existing config files before overwriting them, named *.bak
You have one chance to put them back if HA looks wonky.