Count "on"-time of a binary-sensor

how do I have to write a template to show the measured time in hours and minutes?

…and I tried to round the calculated minutes

state: "{{ states('sensor.brenndauer_tag')|float(0) * 60|round(1, 'floor', 0) }}"

but…

image

Use this method to get value from the history sensor because you’re just putting it into a entities card. No point in dealing with a template when it’s already calculated for you as an attribute.