2018-05-17 17:34:49 +02:00
|
|
|
DHT12 Temperature+Humidity Sensor
|
|
|
|
=================================
|
|
|
|
|
2018-11-14 22:12:27 +01:00
|
|
|
.. seo::
|
|
|
|
:description: Instructions for setting up DHT12 temperature and humidity sensors
|
|
|
|
:image: dht12.jpg
|
|
|
|
:keywords: dht12
|
|
|
|
|
2018-06-01 18:10:00 +02:00
|
|
|
The ``dht12`` Temperature+Humidity sensor allows you to use your DHT12
|
2018-05-17 17:34:49 +02:00
|
|
|
(`datasheet <http://www.robototehnika.ru/file/DHT12.pdf>`__,
|
2020-05-10 21:27:59 +02:00
|
|
|
`electrodragon`_) I^2C-based sensor with ESPHome. This sensor is also called AM2320 by some sellers.
|
2018-05-17 17:34:49 +02:00
|
|
|
|
2018-06-01 18:10:00 +02:00
|
|
|
.. figure:: images/dht12-full.jpg
|
2018-05-17 17:34:49 +02:00
|
|
|
:align: center
|
|
|
|
:width: 50.0%
|
|
|
|
|
2018-08-22 22:05:28 +02:00
|
|
|
DHT12 Temperature & Humidity Sensor.
|
2018-05-17 17:34:49 +02:00
|
|
|
|
|
|
|
.. _electrodragon: http://www.electrodragon.com/product/dht12/
|
|
|
|
|
2018-06-01 18:10:00 +02:00
|
|
|
.. figure:: images/temperature-humidity.png
|
|
|
|
:align: center
|
2018-05-17 17:34:49 +02:00
|
|
|
:width: 80.0%
|
|
|
|
|
2018-11-19 18:32:16 +01:00
|
|
|
.. code-block:: yaml
|
2018-05-17 17:34:49 +02:00
|
|
|
|
|
|
|
# Example configuration entry
|
|
|
|
sensor:
|
|
|
|
- platform: dht12
|
|
|
|
temperature:
|
|
|
|
name: "Living Room Temperature"
|
|
|
|
humidity:
|
|
|
|
name: "Living Room Humidity"
|
2019-01-06 18:56:14 +01:00
|
|
|
update_interval: 60s
|
2018-05-17 17:34:49 +02:00
|
|
|
|
|
|
|
Configuration variables:
|
2018-08-24 22:44:01 +02:00
|
|
|
------------------------
|
2018-05-17 17:34:49 +02:00
|
|
|
|
2018-06-01 18:10:00 +02:00
|
|
|
- **temperature** (**Required**): The information for the temperature sensor.
|
|
|
|
|
|
|
|
- **name** (**Required**, string): The name for the temperature sensor.
|
|
|
|
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
|
2019-02-17 12:28:17 +01:00
|
|
|
- All other options from :ref:`Sensor <config-sensor>`.
|
2018-06-01 18:10:00 +02:00
|
|
|
|
|
|
|
- **humidity** (**Required**): The information for the humidity sensor
|
2018-05-17 17:34:49 +02:00
|
|
|
|
2018-06-01 18:10:00 +02:00
|
|
|
- **name** (**Required**, string): The name for the humidity sensor.
|
|
|
|
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
|
2019-02-17 12:28:17 +01:00
|
|
|
- All other options from :ref:`Sensor <config-sensor>`.
|
2018-05-17 17:34:49 +02:00
|
|
|
|
2019-01-06 18:56:14 +01:00
|
|
|
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``.
|
|
|
|
|
2018-05-17 17:34:49 +02:00
|
|
|
|
2018-06-01 18:10:00 +02:00
|
|
|
See Also
|
2018-08-24 22:44:01 +02:00
|
|
|
--------
|
2018-05-17 17:34:49 +02:00
|
|
|
|
2018-06-01 18:10:00 +02:00
|
|
|
- :ref:`sensor-filters`
|
|
|
|
- :doc:`dht`
|
|
|
|
- :doc:`hdc1080`
|
|
|
|
- :doc:`htu21d`
|
|
|
|
- :doc:`sht3xd`
|
2019-05-12 22:44:59 +02:00
|
|
|
- :apiref:`dht12/dht12.h`
|
2018-08-24 22:44:01 +02:00
|
|
|
- `DHT12 Library <https://github.com/dplasa/dht>`__ by `Daniel Plasa <https://github.com/dplasa>`__
|
2019-02-07 13:54:45 +01:00
|
|
|
- :ghedit:`Edit`
|