Workarround, change Farenheit to Celcius

Hi,

I am new to Losant, but already impressed.

Just a question, in the exercice from the workarround (Dark Sky API + Dashboard), how can I extract the temperature in farenheit, convert it to celcius to display in the dashboard.

I have tryied on the workflow using a Math box, but nothing works.

Thanks

I’m happy you like losant :slight_smile:

You can easily use the Function Node for this.

https://docs.losant.com/workflows/logic/function/

With it, you can read the payload, do the math to convert to Celcius, and attach the new value.

Also, this is doable and still recommended to do with the Math node. Here is an example:

Math.flow (902 Bytes)

In the Math node, you can use this expression:

( {{data.fahrenheit }} - 32) * 5/9