Help with "combine the state of several sensors" helper and SUM

Hello,
I´ve tried to create a simple helper, which counts the turned on lights.
I created it with a display precision of 0.

Under helpers in looks good:
image

On the Dashboard however, it shows a “0.0” value:

Is there something wrong in the code?
Thank you,
Philipp

Hard to say, because you haven’t pasted the code in, and I don’t know what type of dashboard widget that is.

Try: states('sensor.count_light_on_og')|int(0) in place of your existing reference.