# Dynamically change Gauge Units

**URL:** <https://discourse.nodered.org/t/dynamically-change-gauge-units/46517>\
**Category:** Dashboard\
**Created:** [31 May 2021 16:01 UTC](https://discourse.nodered.org/t/dynamically-change-gauge-units/46517 "2021-05-31T16:01:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdpmarcp](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@mdpmarcp](https://discourse.nodered.org/u/mdpmarcp)\
**Post date:** [31 May 2021 16:01 UTC](https://discourse.nodered.org/t/dynamically-change-gauge-units/46517/1 "2021-05-31T16:01:22Z")

</div>

Hi All,

I have searched the boards for a solution to my problem but I have not seen any examples that I understand how to use.

I am receiving temperature data along with a unit of measure (F or C). I would like to change the Gauge units to match. Is this possible and how?

I am really new to this so any examples would be useful.

Thanks

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [31 May 2021 17:25 UTC](https://discourse.nodered.org/t/dynamically-change-gauge-units/46517/2 "2021-05-31T17:25:13Z")

</div>

Here is one way

> [@Dynamically change Gauge Units value](https://discourse.nodered.org/t/dynamically-change-gauge-units-value/46260/3):
>
> The unit field will not take mustache template. but you can use {{speed\_var}} {{speed\_unit}} in the value format field

example

```auto
[{"id":"a005a8da.bc11d8","type":"ui_gauge","z":"c74669a0.6a34f8","name":"","group":"8b5cde76.edd58","order":4,"width":0,"height":0,"gtype":"gage","title":"gauge","label":"","format":"{{payload}} {{unit}}","min":0,"max":"40","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":300,"y":4760,"wires":[]},{"id":"6e1dad61.9521f4","type":"inject","z":"c74669a0.6a34f8","name":"","props":[{"p":"payload"},{"p":"unit","v":"°C","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"24","payloadType":"num","x":120,"y":4800,"wires":[["a005a8da.bc11d8"]]},{"id":"8b5cde76.edd58","type":"ui_group","name":"","tab":"8f03e639.85956","order":1,"disp":true,"width":"12","collapse":false},{"id":"8f03e639.85956","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

**Author:** ![mdpmarcp](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@mdpmarcp](https://discourse.nodered.org/u/mdpmarcp)\
**Post date:** [31 May 2021 23:18 UTC](https://discourse.nodered.org/t/dynamically-change-gauge-units/46517/3 "2021-05-31T23:18:03Z")

</div>

This was a great example. Thanks!!!

 ![4AA15BE9EEF3408BA604319A299565D2.png](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/0/f088f0981ba28181f1f3698c16350c8a26186647.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [30 June 2021 23:18 UTC](https://discourse.nodered.org/t/dynamically-change-gauge-units/46517/4 "2021-06-30T23:18:56Z")

</div>

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