Max value does not appear on the history

Hey guys :wave:t3:

I found this weird mismatch between history and the aggregate_func: max Iโ€™m using on my custom:mini-graph-card .

I have a wind sensor that sends the wind speed every second to HA. When comparing today what the history and the Max/avg graph displayed I found out that the MAX wind speed for today was above what history said:

Card config:

 - type: 'custom:mini-graph-card'
          - entity: sensor.wind_sensor
            aggregate_func: max
            name: Max
            color: red
          - entity: sensor.wind_sensor
            aggregate_func: avg
            name: Avg
            color: yellow
        name: Weekly wind stats
        hours_to_show: 168
        group_by: date
        animate: true

Is history not showing all values due to the high number of reads (1 per second) or is the max wrong?

Thank you

your minigraph card is looking at 168 hours.

Yes, but they are grouped by date, that number is regarding 28 JUL, as displayed below the value

That may be the case, however the line for the mini-graph does not appear to match whatโ€™s in the more-info card. This leads me to believe that the mini graph card is not displaying the information correctly. Your mini-graph-card displays 2 humps, the larger hump being first. Your more-info popup, shows the larger hump 2nd with a flatish line beforehand. The fit line on the mini-graph-card should roughly match the more-info popup.

You can always create a statistics sensor on the information in question and have it match the duration displayed in the card. That will give you the min and max for that section pulled directly from the database. And this will confirm or deny issues with the mini-graph-card.

I actually went to the database to query it, and I can confirm that this must be a bug on the mini-graph-card.

Tank you @petro

1 Like