Page 1 of 1

Numeric state value not appearing on legend

PostPosted: Tue Feb 09, 2021 7:20 am
by MartinG
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 1606 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?

Re: Numeric state value not appearing on legend

PostPosted: Thu Mar 11, 2021 9:31 am
by vtmikel
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?

Re: Numeric state value not appearing on legend

PostPosted: Mon Mar 15, 2021 4:11 am
by MartinG
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,