Store Monthly Values in Entity?

Hey there! I used a slightly tweaked version of some code that was posted here:

I ended up adding an additional column to keep track of the prior months energy usage. An example of my dashboard can be found here:

All credit goes to that guy! Let me know if you have any additional questions. Good luck!