Add INA226 current/power monitor (#403)

* Docs update

* Docs update

* Docs update


Co-authored-by: Sergio Muñoz <sergio@iMac-de-Sergio.local>
This commit is contained in:
Sergio 2019-11-06 13:59:03 +01:00 committed by Otto Winter
parent 25b8b9a8cf
commit e05e0a5865
4 changed files with 70 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

View File

@ -0,0 +1,69 @@
INA226 DC current and power sensor
==================================
.. seo::
:description: Instructions for setting up INA226 DC current and power sensors
:image: ina226.jpg
:keywords: ina226
The ``ina226`` sensor platform allows you to use your INA226 DC Current and Power Sensor
(`datasheet <http://www.ti.com/lit/ds/symlink/ina226.pdf>`__,
`eBay`_) 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/ina226-full.jpg
:align: center
:width: 50.0%
INA226 DC Current and Power Sensor.
.. _eBay: https://www.ebay.com/sch/i.html?_nkw=INA226
.. code-block:: yaml
# Example configuration entry
sensor:
- platform: ina226
address: 0x40
shunt_resistance: 0.1 ohm
current:
name: "INA226 Current"
power:
name: "INA226 Power"
bus_voltage:
name: "INA226 Bus Voltage"
shunt_voltage:
name: "INA226 Shunt Voltage"
max_current: 3.2A
update_interval: 60s
Configuration variables:
------------------------
- **address** (*Optional*, int): Manually specify the i^2c address of the sensor. Defaults to ``0x40``.
- **shunt_resistance** (*Optional*, float): The value of the shunt resistor on the board for current calculation.
Defaults to ``0.1 ohm``.
- **max_current** (*Optional*, float): The maximum current you are expecting. ESPHome will use this to
configure the sensor optimally. Defaults to ``3.2A``.
- **current** (*Optional*): Use the current value of the sensor in amperes. All options from
:ref:`Sensor <config-sensor>`.
- **power** (*Optional*): Use the power value of the sensor in watts. All options from
:ref:`Sensor <config-sensor>`.
- **bus_voltage** (*Optional*): Use the bus voltage (voltage of the high side contact) value of the sensor in V.
All options from :ref:`Sensor <config-sensor>`.
- **shunt_voltage** (*Optional*): Use the shunt voltage (voltage across the shunt resistor) value of the sensor in V.
All options from :ref:`Sensor <config-sensor>`.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``.
See Also
--------
- :ref:`sensor-filters`
- :doc:`ina219`
- :doc:`ina3221`
- :apiref:`ina226/ina226.h`
- `INA226 Arduino Library <https://github.com/SV-Zanshin/INA226>`__
- :ghedit:`Edit`

BIN
images/ina226.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -116,6 +116,7 @@ Sensor Components
Home Assistant, components/sensor/homeassistant, home-assistant.svg
HX711, components/sensor/hx711, hx711.jpg
INA219, components/sensor/ina219, ina219.jpg
INA226, components/sensor/ina226, ina226.jpg
INA3221, components/sensor/ina3221, ina3221.jpg
Integration, components/sensor/integration, sigma.svg
HTU21D, components/sensor/htu21d, htu21d.jpg