Show unit after value or string in computed attribute.

Dsuarez20 days ago

Hi good evening,

I am looking for your assitance to add string after value, when I test the expression it appears please see the below screenshot:

test combustible.PNG

But when i am going to see on the device fuel is hidden maybe expression is not correct please see screenshot below:

Fuel not show in device.PNG

However, When I remove the string +"%"
Remove string.PNG

Fuel is showing up:
showing combustible.PNG

Could you please advise what is the way to show "%" or string after value?

Please see below the computed attribute configuration.

if (io9 == 131) {
    fuel = null;
}
else if (io9 >=12000)fuel = 0; 
else if (io9 <=12000 && io9 >=10800) fuel = 10;
else if (io9 <=10800 && io9 >=9600) fuel = 20;
else if (io9 <=9600 && io9 >=8400) fuel = 30;
else if (io9 <=8400 && io9 >=7200) fuel = 40;
else if (io9 <=7200 && io9 >=6000) fuel = 50;
else if (io9 <=6000 && io9 >=4800) fuel = 60;
else if (io9 <=3600 && io9 >=2400) fuel = 70;
else if (io9 <=2400 && io9 >=1200) fuel = 80;
else if (io9 <=1200 && io9 >=0) fuel = 90;
else if (io9 == 0) fuel = 100;