Graphic representation on how much a switch has been turned on

Hello community…I’m lost.
I’m trying to set up counters in order to have an ApexCharts Card that shows me how much time a specific switch has been “On” during current month.

I thought I was on a correct path, created a Riemann and an Utility Meter helper, but calculations are apparently wrong.

This is the correct data to work on (total time is approx 10hrs):

And this is currently the result (which is totally wrong):
image

Help! :slight_smile:
Thanks!!

Alright this should work, thanks.
How to get the sum of all days in current month so I can see how much time (summarized daily) has been turned on?
Thanks!