Numeric state value not appearing on legend

Posted on
Tue Feb 09, 2021 7:20 am
MartinG offline
Posts: 116
Joined: Aug 19, 2016

Numeric state value not appearing on legend

I have several panels in Grafana in which numeric values (eg Temperature) are plotted correctly on the chart, but where the values do not appear on the legend. Here's an example.

Grafana Chart.jpg
Grafana Chart.jpg (19.95 KiB) Viewed 1451 times


Using the device explorer in the Grafana plug reveals the following for the raw device data:
Code: Select all
Grafana Home Dashboard             state.Temperature: 9.1 (INCLUDED)
Grafana Home Dashboard             state.Temperature.ui: 9.1C (INCLUDED)

Any idea where to start looking in order to fix this?

Posted on
Thu Mar 11, 2021 9:31 am
vtmikel offline
Posts: 628
Joined: Aug 31, 2012
Location: Boston, MA

Re: Numeric state value not appearing on legend

I've never seen that happen. If your device has a <state>.num version, try using that. Otherwise, maybe try using the mean() function in Grafana to force the data into a number. Maybe it's being interpreted as a string?

Posted on
Mon Mar 15, 2021 4:11 am
MartinG offline
Posts: 116
Joined: Aug 19, 2016

Re: Numeric state value not appearing on legend

I think that's the problem - the chart seems to understand that it's a number, and renders accurately, but the legend does not. Using mean() doesn't work unfortunately,

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest