mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-09 02:16:50 +00:00
This reverts commit b1ba5c04f890cefdc7334b27a3b78566a78ec959.
This commit is contained in:
parent
e6e62516eb
commit
8bca1b357c
@ -11,24 +11,16 @@ ha_domain: dht
|
|||||||
|
|
||||||
The `dht` sensor platform allows you to get the current temperature and humidity from a DHT11, DHT22 or AM2302 device.
|
The `dht` sensor platform allows you to get the current temperature and humidity from a DHT11, DHT22 or AM2302 device.
|
||||||
|
|
||||||
## Setup
|
|
||||||
|
|
||||||
To use your DHTxx sensor in your installation, you must first install the `libgpiod2` library.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
sudo apt install libgpiod2
|
|
||||||
```
|
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
Add the following to your `configuration.yaml` file:
|
To use your DHTxx sensor in your installation, add the following to your `configuration.yaml` file:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Example configuration.yaml entry
|
# Example configuration.yaml entry
|
||||||
sensor:
|
sensor:
|
||||||
platform: dht
|
platform: dht
|
||||||
sensor: DHT22
|
sensor: DHT22
|
||||||
pin: D23
|
pin: 23
|
||||||
monitored_conditions:
|
monitored_conditions:
|
||||||
- temperature
|
- temperature
|
||||||
- humidity
|
- humidity
|
||||||
@ -36,7 +28,7 @@ sensor:
|
|||||||
|
|
||||||
{% configuration %}
|
{% configuration %}
|
||||||
sensor:
|
sensor:
|
||||||
description: The sensor type, supported devices are DHT11, DHT22 and AM2302.
|
description: The sensor type, supported devices are DHT11, DHT22, and AM2302.
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
pin:
|
pin:
|
||||||
@ -69,7 +61,7 @@ humidity_offset:
|
|||||||
type: [integer, float]
|
type: [integer, float]
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
|
||||||
The name of the pin to which the sensor is connected has different names on different platforms. 'P8_11' for Beaglebone, 'D23' for Raspberry Pi.
|
The name of the pin to which the sensor is connected has different names on different platforms. 'P8_11' for Beaglebone, '23' for Raspberry Pi.
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
@ -79,7 +71,7 @@ An example for a Raspberry Pi 3 with a DHT22 sensor connected to GPIO4 (pin 7):
|
|||||||
sensor:
|
sensor:
|
||||||
- platform: dht
|
- platform: dht
|
||||||
sensor: DHT22
|
sensor: DHT22
|
||||||
pin: D4
|
pin: 4
|
||||||
temperature_offset: 2.1
|
temperature_offset: 2.1
|
||||||
humidity_offset: -3.2
|
humidity_offset: -3.2
|
||||||
monitored_conditions:
|
monitored_conditions:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user