Canvas button payload data / calculation

Hello,

I am on Grafana v11.5.1 (c6c701cf5b) on RaspberryPi 4 docker.

I created a button on a canvas to set a temperature using json which works.

{ "valve":12 ,
"ctrlTarget": ${temperature} }

What I could not achieve is setting ${temperature} + 1 or - 1. I’d like to have two buttons to increase or decrease the temperature.

${temperature} has the current temperature from infinity json query or graphite query.

Is there a way to have this simple math in the payload?

regards,

Christoph Holtermann

I’ve solved it with a variable set by a graphite query. The query goes on the time series data of target temperature, agggregates over the last value and adds one:

add(aggregateLine(valves.links.tTarget, “last”),1)

I wonder if there would be a less complex solution?