@carlyler thanks for the explanation. That's an interesting way of charging for electricity... The "virtual sensor" had me a little confused as it is also used to create real virtual devices in Domoticz. I think you handled it the royal way. Although you could argue that the "calculation" should take place in the controller.
Have fun and when you designed a way to lower your electricity bill let me know :smile: