Bit of a noob here. Im trying to use the sensor number (float) in my mqtt topic, but cant seem to get this right. Any help would be appreciated. Keep getting this error (cast from 'char*' to 'char' loses precision)
char buffer2[5];
dtostrf(sensor.sensor_no, 4, 2, buffer2);
char* buffer4 = mqtt_topic + char(buffer2);
dtostrf(sensor.dht22_t,0, 0, buffer);
client.publish(buffer4, buffer); //Topic name