2018-05-17 17:34:49 +02:00
|
|
|
DHT12 Temperature+Humidity Sensor
|
|
|
|
=================================
|
|
|
|
|
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>`__,
|
|
|
|
`electrodragon`_) i2c-based sensor with esphomelib.
|
|
|
|
|
2018-06-01 18:10:00 +02:00
|
|
|
.. figure:: images/dht12-full.jpg
|
2018-05-17 17:34:49 +02:00
|
|
|
:align: center
|
|
|
|
:target: `electrodragon`_
|
|
|
|
:width: 50.0%
|
|
|
|
|
|
|
|
DHT12 Temperature & Humidity Sensor. Image by `electrodragon`_.
|
|
|
|
|
|
|
|
.. _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:: yaml
|
|
|
|
|
|
|
|
# Example configuration entry
|
|
|
|
sensor:
|
|
|
|
- platform: dht12
|
|
|
|
temperature:
|
|
|
|
name: "Living Room Temperature"
|
|
|
|
humidity:
|
|
|
|
name: "Living Room Humidity"
|
|
|
|
update_interval: 15s
|
|
|
|
|
|
|
|
Configuration variables:
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
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
|
|
|
|
2018-06-01 18:10:00 +02:00
|
|
|
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``15s``.
|
2018-06-01 18:44:15 +02:00
|
|
|
See :ref:`sensor-default_filter`.
|
2018-05-17 17:34:49 +02:00
|
|
|
|
2018-06-01 18:10:00 +02:00
|
|
|
See Also
|
|
|
|
^^^^^^^^
|
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`
|
|
|
|
- :doc:`API Reference </api/sensor/dht12>`
|