esphome-docs/esphomeyaml/components/sensor/dht12.rst
2018-06-01 18:44:15 +02:00

59 lines
1.8 KiB
ReStructuredText

DHT12 Temperature+Humidity Sensor
=================================
The ``dht12`` Temperature+Humidity sensor allows you to use your DHT12
(`datasheet <http://www.robototehnika.ru/file/DHT12.pdf>`__,
`electrodragon`_) i2c-based sensor with esphomelib.
.. figure:: images/dht12-full.jpg
:align: center
:target: `electrodragon`_
:width: 50.0%
DHT12 Temperature & Humidity Sensor. Image by `electrodragon`_.
.. _electrodragon: http://www.electrodragon.com/product/dht12/
.. figure:: images/temperature-humidity.png
:align: center
: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:
~~~~~~~~~~~~~~~~~~~~~~~~
- **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
- **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>`.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``15s``.
See :ref:`sensor-default_filter`.
See Also
^^^^^^^^
- :ref:`sensor-filters`
- :doc:`dht`
- :doc:`hdc1080`
- :doc:`htu21d`
- :doc:`sht3xd`
- :doc:`API Reference </api/sensor/dht12>`