I’ve not got as far as charting kwh/d yet, but I’m also using integral to get the daily total;
SELECT cumulative_sum(integral("usage")) / 3600 FROM "iot" WHERE ("device" = 'diverter') AND $timeFilter GROUP BY time(1s) fill(null)

The time frame is set in the ‘Singlestat’ Time range tab setting.