I have a smart plug that does not have an energy sensor, but only a current and power sensor (showing current A+W usage). I want a sensor that I can use for energy/cost tracking but fail to understand what I need to do.
Unfortunately the sensor waschmaschine.energy is not increasing but simply displaying current kwH usage as the other sensor. Any help would be appreciated on how to creating such a sensor.
(and obviously removing the other sensors mentioned in my old post)
Honestly, I find this exremely confusing and I think one should write a proper guide on how to use these. Btw, what is the difference between
Power in Watts in an instantaneous meaurement (Volts x Amps) and you cannot convert this to Energy in kWh via a simple equation. Energy is the integration (or summing up) of all the instantaeous Power measurements over a period of time e.g. if you had a 100W lamp running continuously for 1 hour then that would consume 0.1kWh of Energy. This is a very simple example but just imgaine a home with many different electrical devices going on and off at various times - this is exactly what your home electricity meter measures for billing purposes.
Anyway coming back to your question about converting Power to Energy, this has been covered several times before in the forums such as the following:
My problem is not the lack of understanding on how energy works, but rather on how to setup the sensors. I was aware that when my sensor displays 5W for an hour that my consumption was 0,05kWh - but what I wanted was a total consumption, so how much energy was used since I plugged in the device. And since my plugs update with the correct value every second of power usage I was hoping I could easily setup an sensor that simply adds those numbers, which sensor.integration does.
Edit: I just realized that my conversion in kwh was obviously wrong anyway
Please accept my apologies, I looked at your original post and it seemed like you were having trouble with the basics.
I think you need to use the “Integration” integration as you have discovered but note that this is only an approximation because the instantaneous power measurement is sampled and then reported to HA where the integration is performed. For a more accurate measurement, the integration function would normally done in the measuring device and the Energy value then reported to HA.
If you can’t get the integration function working as you want then it may just be easier to prurchase a plug that does this for you.