Modify data in ckeck queries/ configurations

Hi! I’m trying to create a notification that includes the current temperature value. The problem is that I’m receiving data in the format “30.44949579831933 °C” instead of “30.44 °C”. The data comes as floats with two decimal places from the start (arduino, mqtt, influx bucket) but I don’t understand where in the process the rest of the decimals appear. Any idea how I can configure the script to solve this problem? Needless to say, I’ve tried everything to make this modification in the check script but nothing seems to work.

import “influxdata/influxdb/monitor”
import “influxdata/influxdb/v1”
import “math”

data =
from(bucket: “tiempoReal”)
|> range(start: -1h)
|> filter(fn: (r) => r[“_measurement”] == “4f”)
|> filter(fn: (r) => r[“_field”] == “value”)
|> filter(fn: (r) => r[“field”] == “temperatura”)
|> filter(fn: (r) => r[“operaciones1”] == “operaciones1”)
|> aggregateWindow(every: 1d, fn: mean, createEmpty: false)
|> map(fn: (r) => ({r with roundValue: math.floor(x: r.value * 100.0) / 100.0}))

// Se calcula multData antes de usarlo en la función de mensaje
option task = {name: “Temperatura 1”, every: 1m, offset: 0s}

check = {_check_id: “0e3f2e78704dc000”, _check_name: “Sensor 1”, _type: “threshold”, tags: {}}
crit = (r) => r[“value”] > 30.0
warn = (r) => r[“value”] > 28.0 and r[“value”] <= 30.0

// Función para generar mensajes personalizados según el nivel de alerta
messageFn = (r) =>
if r[“value”] > 30.0 then
“Alerta Crítica :rotating_light:: Temperatura extremadamente alta de " + string(v: r.roundValue) + " °C.”
else if r[“value”] > 28.0 and r[“value”] <= 30.0 then
“Advertencia :warning:: Temperatura elevada de " + string(v: r.roundValue) + " °C.”
else
“Temperatura Normal :blush:: " + string(v: r.roundValue) + " °C.”

data
|> v1.fieldsAsCols()
|> monitor.check(data: check, messageFn: messageFn, crit: crit, warn: warn)