Add documentation for MCP9808 sensor (#691)

* Add documentation for MCP9808 sensor

* Compress index image

* Add address configuration variable

Co-authored-by: Otto Winter <otto@otto-winter.com>
This commit is contained in:
Harald Nagel 2020-10-26 11:24:35 -07:00 committed by GitHub
parent 78906b37e8
commit c3a81d4b6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 57 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

View File

@ -0,0 +1,56 @@
MCP9808 Temperature Sensor
==========================
.. seo::
:description: Instructions for setting up MCP9808 temperature sensor.
:image: mcp9808.jpg
:keywords: MCP9808
The MCP9808 Temperature sensor allows you to use your MCP9808
(`datasheet <http://ww1.microchip.com/downloads/en/DeviceDoc/25095A.pdf>`__,
`Adafruit <https://www.adafruit.com/product/1782>`__) sensors with
ESPHome. The :ref:`I²C Bus <i2c>` is
required to be set up in your configuration for this sensor to work.
.. figure:: images/mcp9808-full.jpg
:align: center
:target: `Adafruit`_
:width: 50.0%
MCP9808 Temperature Sensor. Image by `Adafruit`_.
.. _Adafruit: https://www.adafruit.com/product/1782
.. code-block:: yaml
# Example configuration entry
sensor:
- platform: mcp9808
name: "Living Room Temperature"
update_interval: 60s
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>`.
- **address** (*Optional*, int): Manually specify the I²C address of the sensor. Defaults to ``0x18``.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``.
See Also
--------
- :ref:`sensor-filters`
- :doc:`dht`
- :doc:`dht12`
- :doc:`htu21d`
- :doc:`sht3xd`
- :doc:`hdc1080`
- :apiref:`mcp9808/mcp9808.h`
- `MCP9808 Library <https://github.com/adafruit/Adafruit_MCP9808_Library>`__ by `AdaFruit <https://www.adafruit.com/>`__
- :ghedit:`Edit`

BIN
images/mcp9808.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -130,6 +130,7 @@ Sensor Components
MAX31856, components/sensor/max31856, max31856.jpg
MAX31865, components/sensor/max31865, max31865.jpg
MAX6675, components/sensor/max6675, max6675.jpg
MCP9808, components/sensor/mcp9808, mcp9808.jpg
MH-Z19, components/sensor/mhz19, mhz19.jpg
MPU6050, components/sensor/mpu6050, mpu6050.jpg
MQTT Subscribe, components/sensor/mqtt_subscribe, mqtt.png