Calculate carbon equivilant script

I have been exploring lua and plugboard and creating some scripts, here is one that calculates the carbon equivilant of the electricity consumed with a 1 minute update.

The source of the data in this script is ch.1 on a currentcost device:-

dbzoo.livebox.1.CurrentCost:ch.1

Note that I have an instance of "1" configured and that if you do not use this configuration you will have to change this.

If you use more than one channel then you need to change to use ch.total and if you are playing with the beta with the eco manager support then this would become ch.H