# Dashboard2 / Gauge / Label

**URL:** https://discourse.nodered.org/t/dashboard2-gauge-label/95264
**Category:** Dashboard
**Tags:** dashboard-2
**Created:** [9 February 2025 19:28 UTC](https://discourse.nodered.org/t/dashboard2-gauge-label/95264 "2025-02-09T19:28:14Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![CAG](https://avatars.discourse-cdn.com/v4/letter/c/a9adbd/32.png) [@CAG](https://discourse.nodered.org/u/CAG)
#### Post date: [9 February 2025 19:28 UTC](https://discourse.nodered.org/t/dashboard2-gauge-label/95264/1 "2025-02-09T19:28:14Z")

</div>

I am just starting to play with Dashboard2. I have a number of battery powered sensors and want to display the last battery charge (%) and when it was last updated. I was doing this in Dashboard using the Label field - Tackroom Sensor   
{{msg.convertDateTime}} which provides this -  
Tackroom Sensor  
2/9/2025, 1:05:30 AM

With Dashboard2 this doesn't work.  
I get this - Tackroom Sensor   
{{msg.convertDateTime}}

Does this just work yet or am I doing it wrong for Dashboard2?

Thanks, Chris

---

<div class="post-metadata">

### Author: ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)
#### Post date: [9 February 2025 19:44 UTC](https://discourse.nodered.org/t/dashboard2-gauge-label/95264/2 "2025-02-09T19:44:32Z")

</div>

> [@CAG](#):
>
> am I doing it wrong for Dashboard2

Yes you almost certainly are but you have not told us enough to know exactly what.

> [@CAG](#):
>
> I was doing this in Dashboard using the Label field - Tackroom Sensor  
> {{msg.convertDateTime}}

What do you mean by the Label field?  
Is this a text widget?

> [@CAG](#):
>
> With Dashboard2 this doesn't work.  
> I get this - Tackroom Sensor  
> {{msg.convertDateTime}}

You need to show us how you have configured the widget, in particular where the string`{{msg.convertDateTime}}` is entered.

It would be useful to see the output in a debug node showing the complete message passed to the dashboard.

---

<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: [9 February 2025 20:05 UTC](https://discourse.nodered.org/t/dashboard2-gauge-label/95264/3 "2025-02-09T20:05:44Z")

</div>

With Dashboard 2 gauge the label field can be dynamically updated by sending the the property `msg.ui_update.label`

> **[Gauge ui-gauge | Node-RED Dashboard 2.0](https://dashboard.flowfuse.com/nodes/widgets/ui-gauge.html#dynamic-properties)**
>
> Display real-time metrics with ui-gauge in Node-RED Dashboard 2.0 for immediate data visualization.

---

<div class="post-metadata">

### Author: ![CAG](https://avatars.discourse-cdn.com/v4/letter/c/a9adbd/32.png) [@CAG](https://discourse.nodered.org/u/CAG)
#### Post date: [9 February 2025 20:57 UTC](https://discourse.nodered.org/t/dashboard2-gauge-label/95264/4 "2025-02-09T20:57:22Z")

</div>

This is the Gauge Node for Dashboard2, sorry I missed saying that.  
Here is the message...  
2/9/2025, 12:51:55 PM[node: debug 33](http://192.168.2.40:1880/#)Tackroom-Battery : msg : Object

object  
nodeName: "Barn Tack Room Zooz Notification Sensor Battery"  
topic: "Tackroom-Battery"  
payload: 35  
\_msgid: "5feff84cdb7029e7"  
convertDateTime: "2/9/2025, 1:05:30 AM"  
\_event: "node:b0723fccc97748dd"

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/3/b39b3561d91d39a1137e6b9976db15bd9772f716.png)

---

<div class="post-metadata">

### Author: ![CAG](https://avatars.discourse-cdn.com/v4/letter/c/a9adbd/32.png) [@CAG](https://discourse.nodered.org/u/CAG)
#### Post date: [9 February 2025 21:01 UTC](https://discourse.nodered.org/t/dashboard2-gauge-label/95264/5 "2025-02-09T21:01:26Z")

</div>

Thanks, that did the trick. I need to add in the name still but it should work. I didn't need to do that with Dashboard.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/6/86f75dab14d1498b118d8a53ee4ffed2330838cc.png)

---

<div class="post-metadata">

### Author: ![CAG](https://avatars.discourse-cdn.com/v4/letter/c/a9adbd/32.png) [@CAG](https://discourse.nodered.org/u/CAG)
#### Post date: [9 February 2025 21:15 UTC](https://discourse.nodered.org/t/dashboard2-gauge-label/95264/6 "2025-02-09T21:15:37Z")

</div>

ok, one last issue. I am using the change node to set the value for msg.ui\_update.label  
While I can get the value of msg.convertDateTime to display, I am having trouble including the rest of the text.  
2/9/2025, 1:11:25 PM[node: debug 33](http://192.168.2.40:1880/#)Tackroom-Battery : msg : Object  
object  
nodeName: "Barn Tack Room Zooz Notification Sensor Battery"  
topic: "Tackroom-Battery"  
payload: 35  
\_msgid: "b1535c5c73bf2d5c"  
convertDateTime: "2/9/2025, 1:05:30 AM"  
ui\_update: object  
label: "`Tackroom Sensor <br>${msg.convertDateTime}`"

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/9/799c2a1ddf38cbc59a12d465fc1292430a6561b4.png)

---

<div class="post-metadata">

### Author: ![CAG](https://avatars.discourse-cdn.com/v4/letter/c/a9adbd/32.png) [@CAG](https://discourse.nodered.org/u/CAG)
#### Post date: [9 February 2025 23:43 UTC](https://discourse.nodered.org/t/dashboard2-gauge-label/95264/7 "2025-02-09T23:43:33Z")

</div>

I got it to mostly work. I have all of the information in the label now, but I can't seem to get a newline so I get 2 lines of text. It wraps just fine, so how do you insert a newline??

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/6/a65e8189ab061abcfd8e82e00f792c9fc708c29b.png)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/2/52a644f0455327e78ac02410e8ccdf9756c0d6db.png)

---

<div class="post-metadata">

### Author: ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)
#### Post date: [10 February 2025 09:35 UTC](https://discourse.nodered.org/t/dashboard2-gauge-label/95264/8 "2025-02-10T09:35:51Z")

</div>

That is likely a shortfall of the Dashboard 2.0 at the moment. The only thing I could think of off the top of my head would be to use `<br/>` instead of `/n`

---

<div class="post-metadata">

### Author: ![CAG](https://avatars.discourse-cdn.com/v4/letter/c/a9adbd/32.png) [@CAG](https://discourse.nodered.org/u/CAG)
#### Post date: [10 February 2025 18:24 UTC](https://discourse.nodered.org/t/dashboard2-gauge-label/95264/9 "2025-02-10T18:24:52Z")

</div>

> [@joepavitt](#):
>

The didn't seem to work. I can wait for improvements.

One other thing that I noticed is that on my phone the battery level is different than on my PC. The fill is only showing up on the one device while on the PC is shows on all of them. I copied the nodes show they are all configured the same.  
One the Phone -

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/b/4babecf6dcca5229aa63a2a607fe5d5d16b0bea9.png)

On the PC -

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/b/5bc2f1ea1addf8e59d3e869c9e82369cec07ec3b.png)

Thanks, Chris

---

<div class="post-metadata">

### Author: ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)
#### Post date: [11 February 2025 09:44 UTC](https://discourse.nodered.org/t/dashboard2-gauge-label/95264/10 "2025-02-11T09:44:39Z")

</div>

Thanks for checking Chris, could I trouble you to [raise an issue](https://github.com/FlowFuse/node-red-dashboard/issues) in that case please?

---

<div class="post-metadata">

### Author: ![CAG](https://avatars.discourse-cdn.com/v4/letter/c/a9adbd/32.png) [@CAG](https://discourse.nodered.org/u/CAG)
#### Post date: [13 February 2025 19:32 UTC](https://discourse.nodered.org/t/dashboard2-gauge-label/95264/11 "2025-02-13T19:32:12Z")

</div>

Done - Dashboard2/Gauge/Battery #1617  
I included the images and versions and a short description.  
[Dashboard2/Gauge/Battery · Issue #1617 · FlowFuse/node-red-dashboard](https://github.com/FlowFuse/node-red-dashboard/issues/1617)

Chris

---

<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: [15 March 2025 19:33 UTC](https://discourse.nodered.org/t/dashboard2-gauge-label/95264/12 "2025-03-15T19:33:12Z")

</div>

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