Hi,
from my temp sensors I receive values which I have to divide by 10 to get the correct degrees Celsius value. For instance my sensor delivers 190, but I want to have 19.0 to be shown on a dashboard.
Searching the docs I found the map() function. However, I’m not able to get it working.
My current query looks like this:
import “influxdata/influxdb/schema”
from(bucket: “hometest/autogen”)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r[“_measurement”] == “rooms”)
|> filter(fn: (r) => r[“_field”] == “temp” or r[“_field”] == “id”)
|> schema.fieldsAsCols()
|> filter(fn: (r) => r[“id”] == 99954512588)
|> group(columns: [“id”])
|> aggregateWindow(every: v.windowPeriod, column: “temp”, fn: last)
|> yield()
Any idea how this can be implemented?