I am new to HA and working on custom sensors and templates. One problem that seems to pop up every now and then is that the sensor history shows spikes. I assume that when it calculated, one of the variables or other referenced sensors was unavailable or something and so depending on the calculations, the sensor either spikes to a very high value or it drops to zero, but only for a moment and within seconds it comes back to normal.
Wow this is very helpful - thank you! I know it’s basic stuff but like I said I am learning, so this will set my path in a better direction going forward And yes, I should have been using kW instead of kWh - thanks for pointing that out