I’d like to find the date of my best solar production. I’ve just started exploring the InfluxDB addon and I can get as far as this query
SELECT max("value") AS "max_value" FROM "home_assistant"."autogen"."kWh" WHERE time > :dashboardTime: AND time < :upperDashboardTime: AND "friendly_name"='Solar Power Today' GROUP BY time(1d) FILL(null)
which shows a nice graph with dates on the x axis and kwh for the day on the y axis. (the entity gets added to constantly throughout the day and then zeroed just before midnight)
But now how do I find the date and value which are the max all-time? I mean, I can change the dates on the dashboard easily enough, but I don’t mean to search the entire graph for the past N years. Isn’t this something a database ought to be able to answer easily? I just can’t see it. Guessing several others have already done the same thing, right?