esphome-docs/components/sensor/dht12.rst

67 lines
2.0 KiB
ReStructuredText
Raw Normal View History

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>`__,
2019-01-09 14:43:18 +01:00
`electrodragon`_) i2c-based sensor with esphomelib. 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%
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%
.. 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.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- **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.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
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`
- :apiref:`sensor/dht12_component.h`
2018-08-24 22:44:01 +02:00
- `DHT12 Library <https://github.com/dplasa/dht>`__ by `Daniel Plasa <https://github.com/dplasa>`__
- :ghedit:`Edit`
2018-10-12 16:33:22 +02:00
.. disqus::