Bme680 - Mqtt publishing issue

Hi there,
i am sorry to bother you, but i have spent so many hours to figure it out myself, but can not get it done, also i am newbie to arduino. Everything is working except this section that i would like to publish to Mqtt.
thank you for some advice…

String CalculateIAQ( byte score){
String IAQ_text = "Air quality is ";
score = (100-score)*5;
Serial.print("Current score is: ");
Serial.println(score);
if (score >= 301) IAQ_text += “Hazardous”;

else if (score >= 201 && score <= 300 ) IAQ_text += “Very Unhealthy”;
client.publish(“home/livingroom/airquality”, 5 );
else if (score >= 176 && score <= 200 ) IAQ_text += “Unhealthy”;
client.publish(“home/livingroom/airquality”, 4 );
else if (score >= 151 && score <= 175 ) IAQ_text += “Unhealthy for Sensitive Groups”;
client.publish(“home/livingroom/airquality”, 3 );
else if (score >= 51 && score <= 150 ) IAQ_text += “Moderate”;
client.publish(“home/livingroom/airquality”, 2 );
else if (score >= 00 && score <= 50 ) IAQ_text += “Good”;
client.publish(“home/livingroom/airquality”, 1 );

homekit_Bme680-delete.ino (9.45 KB)

So all other client.publish commands work, correct?
I think you may need to do it like this instead:

client.publish("home/livingroom/airquality", '5' );
Or maybe even
client.publish("home/livingroom/airquality", "5" );

nope, did not work either way, but i have been trying to publish "score" and ended up with :

From serial monitor:
MQTT: Send String payload to topic: home/livingroom/airquality
MQTT: Send payload: 41.23
MQTT: Failed send float payload

So i am guessing that there some issue with variables conversion