Create energy sensor for Energy-Dashboard from Node-Red?

I’ve added device_class on my entry, but didn’t help. But I found a solution for this:

Oh and I used payload.latest.energyOut_wh for the result and divided by 1000 to get the kilo result