This commit is contained in:
Otto Winter 2018-05-17 17:34:49 +02:00
parent 876ff4b64b
commit ef6ea48a89
No known key found for this signature in database
GPG Key ID: DB66C0BE6013F97E
7 changed files with 102 additions and 2 deletions

27
api/sensor/dht12.rst Normal file
View File

@ -0,0 +1,27 @@
DHT12 Temperature/Humidity Sensor
=================================
Example Usage
-------------
.. code-block:: cpp
// Basic
App.make_dht12_sensor("Outside Temperature", "Outside Humidity");
.. cpp:namespace:: nullptr
See :cpp:func:`Application::make_dht12_sensor`.
API Reference
-------------
.. cpp:namespace:: nullptr
.. doxygentypedef:: sensor::DHT12TemperatureSensor
.. doxygentypedef:: sensor::DHT12HumiditySensor
.. doxygenclass:: sensor::DHT12Component
:members:
:protected-members:
:undoc-members:

View File

@ -13,6 +13,7 @@ See :cpp:func:`Application::register_sensor`.
adc-sensor.rst
dallas.rst
dht.rst
dht12.rst
pulse-counter.rst
ultrasonic.rst
ads1115.rst

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

View File

@ -0,0 +1,63 @@
DHT12 Temperature+Humidity Sensor
=================================
.. warning::
This sensor is experimental has not been fully tested yet as I do not own all sensors. If you
can verify it works (or if it doesn't), please notify me on `discord <https://discord.gg/KhAMKrd>`__.
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:: /esphomeyaml/components/sensor/dht12-full.jpg
:align: center
:target: `electrodragon`_
:width: 50.0%
DHT12 Temperature & Humidity Sensor. Image by `electrodragon`_.
.. _electrodragon: http://www.electrodragon.com/product/dht12/
|image0|
.. |image0| image:: /esphomeyaml/components/sensor/temperature-humidity.png
:class: 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.
- All other options from
`Sensor </esphomeyaml/components/sensor/index.html#base-sensor-configuration>`__
and `MQTT
Component </esphomeyaml/components/mqtt.html#mqtt-component-base-configuration>`__.
- **humidity** (**Required**): The information for the humidity sensor
- **name** (**Required**, string): The name for the humidity sensor.
- All other options from
`Sensor </esphomeyaml/components/sensor/index.html#base-sensor-configuration>`__
and `MQTT
Component </esphomeyaml/components/mqtt.html#mqtt-component-base-configuration>`__.
- **update_interval** (*Optional*, `time </esphomeyaml/configuration-types.html#time>`__): The interval to check the
sensor. Defaults to ``15s``.
- **id** (*Optional*, `id </esphomeyaml/configuration-types.html#id>`__): Manually specify the ID used for code
generation.

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -39,6 +39,9 @@ Features
Using With
~~~~~~~~~~
This list contains guides for how to use esphomeyaml with different devices. Note that
it's far from complete right now and esphomeyaml can be used with many more devices than this.
================== ================== ==================
|Sonoff S20|_
------------------ ------------------ ------------------
@ -128,9 +131,9 @@ Sensor Components
---------------------- ---------------------- ----------------------
`BME280`_ `BME680`_ `TSL2561`_
---------------------- ---------------------- ----------------------
|SHT3X-D|_
|SHT3X-D|_ |DHT12|_
---------------------- ---------------------- ----------------------
`SHT3X-D`_
`SHT3X-D`_ `DHT12`_
====================== ====================== ======================
.. |Sensor Core| image:: /esphomeyaml/images/folder-open.svg
@ -197,6 +200,10 @@ Sensor Components
:class: component-image
.. _SHT3X-D: /esphomeyaml/components/sensor/sht3xd.html
.. |DHT12| image:: /esphomeyaml/images/dht12.jpg
:class: component-image
.. _DHT12: /esphomeyaml/components/sensor/dht12.html
Binary Sensor Components
~~~~~~~~~~~~~~~~~~~~~~~~
@ -490,4 +497,5 @@ Full Index
components/sensor/bme680.rst
components/sensor/tsl2561.rst
components/sensor/sht3xd.rst
components/sensor/dht12.rst
components/using-with/sonoff-s20.rst

View File

@ -32,6 +32,7 @@ a light is a combination of output components.
api/sensor/bmp085.rst
api/sensor/dallas.rst
api/sensor/dht.rst
api/sensor/dht12.rst
api/sensor/htu21d.rst
api/sensor/hdc1080.rst
api/sensor/pulse-counter.rst