I figured out how to do this, but the result is that you get a pretty icon and basically useless values. I am displaying the RSSI values of a number of MQTT devices, and, in order to get the icon to work, you have to map the RSSI to a 1-4 scale to represent the signal-1, signal-2, etc… icons. So now, rather than showing me the RSSI = 50% I get RSSI = 2 and the signal-2 icon is displayed.
rssi.scale
file in the transform directory:
[0,25]=1
[25,50]=2
[50,75]=3
[75,100]=4
Yes, there would be a flaw if I got a reading of exactly 25, 50, or 75, but I always seem to be a few percent higher or lower, so I don’t have a problem. I am not sure which icon would get picked if that happened.
Then, in my Items file:
Number item_rssi "Item RSSI: [SCALE(rssi.scale):%s]" <signal> (gRSSI) { mqtt=........}