Hello @sineverba,
I tried to work with the data on your instance. I think the issue is that the series are the same so they’re over writing each other? I used the set function to change the mean, mix, max values like:
data = from(bucket: "homeassistant-aprilia")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["entity_id"] == "0x00158d000484fb9a_temperature" or r["entity_id"] == "0x00158d0004a01639_temperature" or r["entity_id"] == "0x00158d00067beedf_temperature")
|> filter(fn: (r) => r["_field"] == "value")
// |> yield(name: "raw")
data
|> aggregateWindow(every: 24h, fn: max, createEmpty: false)
|> set(key: "_field", value: "max_value")
|> yield(name: "max")
// |> to(bucket: "downsample-temperature-aprilia", org: "sineverba")
data
|> aggregateWindow(every: 24h, fn: min, createEmpty: false)
|> set(key: "_field", value: "min_value")
|> yield(name: "min")
// |> to(bucket: "downsample-temperature-aprilia", org: "sineverba")
data
|> aggregateWindow(every: 24h, fn: mean, createEmpty: false)
|> set(key: "_field", value: "mean_value")
|> yield(name: "mean")
// |> to(bucket: "downsample-temperature-aprilia", org: "sineverba")
I couldn’t test it with the to function because I don’t have permissions to create new buckets and I didn’t want to write data to another one of your buckets. Lmk if that works and sorry for the delay.
This query is producing 9 series as expected though.