Average time a HVAC fan is on in a 24 hour period

I’m looking to see if anyone has a way to display the average time that the HVAC fan runs daily. I have the sensor that shows me on/off, but I would love to be able to see the avg. time that the fan runs every day. I was torn on how to do this and figured I would see if anyone has already pulled off something like this.

I do also do have grafana/influxdb configured, I’m sure I could put something in there then present it over to HA, but I don’t even know where to start to setup something like this in there.

Any thoughts?

Check out the History Stats sensor.

1 Like

Probably not 100% what you are looking for but shows the on/off ratio of the past 7 days:

  - platform: history_stats

    name: Heizungsansteuerung Büro letzte 7 Tage
    entity_id: binary_sensor.state_buero
    state: 'on'
    type: ratio
    end: '{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}'
    duration:
      days: 7
1 Like

Good lord that was so easy! I have no idea why I had such a brain fart. Thanks so much!