Thank you a ton Mitch, your code has been a great help. I too had purchased a couple of these outlets on clearance, and I’m excited they are now reporting energy usage.
I took your code and made a few slight modifications. Primarily, it now reports “power” (instantaneous W) in addition to “energy” (kWh over time). You had already made these calculations, but I’ve added the “Power Meter” capability to ensure the device is exposing instantaneous usage too.