Skip to content

[hdc302x] New component docs #5220

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions components/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ Environmental
ENS160, components/sensor/ens160, ens160.jpg, CO2 & Air Quality
ENS210, components/sensor/ens210, ens210.jpg, Temperature & Humidity
HDC1080, components/sensor/hdc1080, hdc1080.jpg, Temperature & Humidity
HDC302X, components/sensor/hdc302x, hdc302x.png, Temperature & Humidity
HHCCJCY10 (MiFlora Pink), components/sensor/xiaomi_hhccjcy10, xiaomi_hhccjcy10.jpg, Soil moisture & Temperature & Light
Honeywell ABP, components/sensor/honeywellabp, honeywellabp.jpg, Pressure & Temperature
Honeywell ABP2 I2C, components/sensor/honeywellabp2_i2c, honeywellabp.jpg, Pressure & Temperature
Expand Down
73 changes: 73 additions & 0 deletions components/sensor/hdc302x.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
HDC302x Temperature and Humidity Sensor
=======================================

.. seo::
:description: Instructions for setting up HDC302x temperature and humidity sensor for use with ESPHome.
:image: hdc302x.png
:keywords: HDC3020, HDC3021, HDC3022

The `hdc302x` sensor platform allows you to use your HDC302x temperature and humidity sensor
(`datasheet <https://www.ti.com/lit/ds/symlink/hdc3020.pdf>`__,
`Adafruit <https://www.adafruit.com/product/5989>`__) with ESPHome.

The :ref:`I²C Bus <i2c>` is required to be set up in your configuration for this sensor to work.

.. figure:: images/hdc302x.png
:align: center
:width: 80.0%

.. _Adafruit: https://www.adafruit.com/product/5989

.. code-block:: yaml

sensor:
- platform: hdc302x
temperature:
name: "Temperature"
humidity:
name: "Relative Humidity"
update_interval: 60s

Configuration variables:
------------------------

- **temperature** (*Optional*): Temperature.

- All options from :ref:`Sensor <config-sensor>`.

- **humidity** (*Optional*): Relative Humidity.

- All options from :ref:`Sensor <config-sensor>`.

- **power_mode** (*Optional*, enum): The Power Mode used when triggering temperature and humidity readings. This
affects the accuracy of readings and the power usage of the sensor.

- ``HIGH_ACCURACY`` (Default): Low Power Mode 0 - Highest accuracy, slower, higher power usage.
- ``BALANCED``
- ``LOW_POWER``
- ``ULTRA_LOW_POWER``: Low Power Mode 3 - Lowest power usage, faster, less accuracy.

- **heater** (*Optional*, boolean): If true, enable the relative humidity sensor's integrated heater.
*Note: This will significantly impact temperature readings.*

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be best to document setting address and i2c_id as well if someone wants to use multiple HDC302x sensors?

- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``.

Heater Configuration:
---------------------

The HDC302X includes an integrated heater in the relative humidity sensor, which is intended to remove condensation
from the sensor in high humidity environments. This can help maintain accurate humidity measurements.

The heater can be enabled by setting ``heater`` to ``true``. This will run the heater with the default sensor settings.

See the (`datasheet <https://www.ti.com/lit/ds/symlink/hdc3020.pdf>`__) for more information about heater operation.

See Also
--------

- :doc:`/components/sensor/sht4x`
- :doc:`/components/sensor/hdc1080`
- :ref:`sensor-filters`
- :doc:`absolute_humidity`
- :apiref:`hdc302x/hdc302x.h`
- :ghedit:`Edit`
Binary file added components/sensor/images/hdc302x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/hdc302x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.