Help with creating current energy use graphs

I think both sensors gives you the same output. In the first version you use the the python code 0.1f, meaning the result is formatted as a float value with one decimal.

The % use used within the template to execute the commands I think. You use it in almost all template definitions.

The second sensor converts the state of the input to float with the | float at the end. Better is to use | float(0) though. That also provides a default value of 0 in case the input is unavailable. Currently this still works without the default value, but will need mandatory in the December release I believe.

To your last question… Those variables are only temporary and usable within your template, not outside of it. I am not 100% sure though…

P.S. I see you also use the SolarEdge integration, you may find other useful templates and examples in my project.

1 Like