I have InfluxDB being populated by Home Assistant and am trying to produce a ‘maximum’ value per day chart. The metric being graphed is the ongoing savings made in fuel, so is constantly rising and reverts to zero at midnght.
What I have is working except the data isn’t brilliant as there are often values just after midnight that are clearly from the previous day, before whatever process drops the value back down to zero.
My query is currently:
SELECT max("value") FROM "GBP" WHERE ("entity_id"::tag = 'electricity_savings') AND $timeFilter GROUP BY time(1d) fill(null)
or:
I need a way to ignore those early morning anomalies, perhaps by returning the maximum value only when the hour is 23, for example?
I’m a little stumped on how to achieve this?
Thanks