Sensor solargen shown no values

Firstly, please format your code correctly:

Your template appears to output the Shelly power figure if it’s above zero, and 0 if it is below zero. Your graph shows the Shelly at -168W, so the template should be outputting zero.

Looks to me like it’s doing what you asked it to…