This is the old one.

The new one is very similar to this.

It was a easy DIY, just need to drill 2 new holes in the solid wood and carefully connect 3 wires. Checked and rechecked and everything works great.
But by law, can I do this myself? Will this affect my house insurance? Does insurance company has any ways to find out?