Usage stats

Hi all, the simple question is to create a chart with the number of minutes an heater was on in a day. Now I have a badge to show the minute of the current day

    name: Heater on today
    entity_id: switch.sonoff
    state: 'on'
    type: time
    start: '{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}'
    end: '{{ now() }}'

The chart I want must have only one value for a day
thanks in advance

There’s some examples of how to set the duration to a day lower down on that doc.

1 Like

Hi all, I forgot to answer that using the duration I obtained one value for a day. However, even if I used the type: time the chart shows a value which is not in the format HH:MM but is in a decimal format. For example 51minutes are shown as 0.86 h. see the image below
Schermata da 2021-10-13 21-30-26
is there a way to obtain the number expressed as time HH:MM

Paolo