ESP8266 contents of a string getting lost (comfortStatus)

Wrong lines… :open_mouth:

Up the top should be…

int dhtPin=D3;
int pressure_offset=1000;
float dht_tv,dht_hv,bmp_tv,bmp_pv,bmp_av;
float heatIndex=0;
float dewPoint=0;
float cr=0;
String comfortStatus="";

In your DHT22_Get() function

delete String confortStatus;
delete float from

  float heatIndex = dht.computeHeatIndex(newValues.temperature, newValues.humidity);
  float dewPoint = dht.computeDewPoint(newValues.temperature, newValues.humidity);
  float cr = dht.getComfortRatio(cf, newValues.temperature, newValues.humidity);

In other words, if you’ve declared the variables ‘globaly’ within a given c++ unit/file, don’t declare them again locally within a function.