The SHT31 includes an internal heater, but Sensirion defines it for plausibility checking—not as a normal measurement feature. A useful diagnostic briefly enables the heater, confirms its state through the status register, observes the expected temperature rise and relative-humidity response, then disables it and discards readings until the sensor returns near baseline.
This test can answer a narrow question: does the sensing element respond to deliberate self-heating? It cannot prove absolute calibration, diagnose every contamination mechanism or produce valid ambient humidity while the heater is active.
Use the two heater commands as an explicit state change
The SHT3x-DIS datasheet, version 7, assigns 0x306D to heater enable and 0x3066 to heater disable. After reset, the heater is off. Sensirion specifies heater power from 3.6 to 33 mW depending on supply voltage and describes the resulting temperature increase as a few degrees Celsius.

That range is why firmware should look for a directionally sensible response rather than a universal temperature step. Board copper, airflow, supply voltage and mounting all change how quickly heat reaches the sensing element and how quickly it dissipates.
Verify the heater state instead of assuming the write worked
Command 0xF32D reads the status register. Bit 13 reports heater state: 0 is off and 1 is on. The same register also exposes reset, command-status and checksum-related flags, so logging the complete status word gives more evidence than recording only the converted temperature and humidity.
baseline = read_sample();
write_command(0x306D); // heater on
status = read_status(0xF32D);
if ((status & 0x2000) == 0) return HEATER_NOT_ENABLED;
collect_diagnostic_samples();
write_command(0x3066); // heater off
confirm((read_status(0xF32D) & 0x2000) == 0);
Keep the interval bounded in firmware and always execute the disable command on error paths. A watchdog reset or exception should not leave the application assuming the next sample is ambient data. Because a reset disables the heater, a reset-and-status check is also a recovery route if state becomes uncertain.
Interpret the response physically
When the sensing element warms, reported temperature should rise. With the surrounding water-vapor content roughly unchanged over the short diagnostic interval, reported relative humidity normally falls because relative humidity is temperature-dependent. That paired direction is more useful than either channel alone.

A flat response can indicate that the enable command did not take effect, the wrong sensor is being addressed, sampling stopped, or the device has a fault. An unusual response is not by itself a calibration verdict. Compare against the pre-heater baseline and preserve raw timestamps, status words and CRC results.
Discard heated samples and wait for recovery
Measurements taken with heater-status bit 13 set are diagnostic artifacts. Mark them invalid for environmental logging. After sending 0x3066, continue sampling until temperature and humidity settle close to the pre-test trajectory; a fixed recovery delay is less defensible than an observed return because airflow and board thermal mass differ.
Sensirion also provides a bus-interface reset sequence: leave SDA high, toggle SCL nine or more times, then issue a transmission start before the next command. That resets the interface but preserves the status register. Use it only for a stuck communication state; it does not substitute for explicitly disabling the heater or validating the data path.
What the check proves
A successful heater response establishes that commands reach the device, the heater state changes and the sensing element reports a plausible thermal response. It does not establish ±0.3 °C or ±2% RH accuracy, and it should not be presented as a condensation-removal cycle unless a separate application-specific procedure and operating limits support that claim.

