WTH: I loose all energy data history if I need to change a energy entity

Using device ids makes a mess and cause these exact situations which is why many on the forum warns users against them.
Using entity ids makes it much easier.