ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
esphome::dht Namespace Reference

Data Structures

class  DHT
 Component for reading temperature/humidity measurements from DHT11/DHT22 sensors. More...
 

Enumerations

enum  DHTModel : uint8_t {
  DHT_MODEL_AUTO_DETECT = 0 , DHT_MODEL_DHT11 , DHT_MODEL_DHT22 , DHT_MODEL_AM2120 ,
  DHT_MODEL_AM2302 , DHT_MODEL_RHT03 , DHT_MODEL_SI7021 , DHT_MODEL_DHT22_TYPE2
}
 

Functions

 ESPHOME_LOG_TAG (TAG, "dht")
 
int16_t decode_dht22_temperature (uint16_t raw)
 Convert a DHT22-family temperature reading to tenths of a degree.
 

Enumeration Type Documentation

◆ DHTModel

enum esphome::dht::DHTModel : uint8_t
Enumerator
DHT_MODEL_AUTO_DETECT 
DHT_MODEL_DHT11 
DHT_MODEL_DHT22 
DHT_MODEL_AM2120 
DHT_MODEL_AM2302 
DHT_MODEL_RHT03 
DHT_MODEL_SI7021 
DHT_MODEL_DHT22_TYPE2 

Definition at line 9 of file dht.h.

Function Documentation

◆ decode_dht22_temperature()

int16_t esphome::dht::decode_dht22_temperature ( uint16_t raw)
inline

Convert a DHT22-family temperature reading to tenths of a degree.

Sensors encode negative values in one of three ways: sign and magnitude (bit 15 set, bit 14 clear), 16-bit two's complement, or 12-bit two's complement (bit 11).

Definition at line 22 of file dht.h.

◆ ESPHOME_LOG_TAG()

esphome::dht::ESPHOME_LOG_TAG ( TAG ,
"dht"  )