How to extract only Temperature from a Msg.Payload : Object

Hi, I just want to visualise the 2 temperatures coming from 2 DS18B20 connected on port 4.
For some reason the payload is not just a number but it containd the id and the temperature.
How can I send only the value of the temperature to the gauge?

[{"id":"e2b4fabf.4316f8","type":"ui_gauge","z":"ec21e019.06fec","name":"","group":"653a7658.e1df08","order":3,"width":0,"height":0,"gtype":"gage","title":"gauge","label":"units","format":"{{value}}","min":0,"max":10,"colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":650,"y":240,"wires":[]},{"id":"653a7658.e1df08","type":"ui_group","name":"Temperature Ext Int","tab":"590954b.dffadac","order":1,"disp":true,"width":11,"collapse":false,"className":""},{"id":"590954b.dffadac","type":"ui_tab","name":"Grafico","icon":"dashboard","disabled":false,"hidden":false}]

Thanks for your help

Andrea


Many ways to do this. One simple way is to use the change node just before the gauge

1 Like

Or just set the ui_gauge node to show the value of msg.payload.temperature directly?

Magnificent! thanks Feeling very newbe... ahahaha

It saves a node if, instead of the change node, in the Gauge node you set the Value Format field to {{msg.payload.temperature}}, which was what @shrickus was suggesting.l

Thanks. Really appreciated

Got it, thanks. I like both solutions

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.