mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-11-10 10:11:29 +01:00
88e315e0e4
* Many example yaml tidy-ups * Update components/sensor/hlw8012.rst --------- Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
64 lines
2.4 KiB
ReStructuredText
64 lines
2.4 KiB
ReStructuredText
CSE7761 Power Sensor
|
|
====================
|
|
|
|
.. seo::
|
|
:description: Instructions for setting up CSE7761 power sensors for the Sonoff Dual R3 v1.x
|
|
:image: cse7761.svg
|
|
:keywords: cse7761, Sonoff Dual R3
|
|
|
|
The ``cse7761`` sensor platform allows you to use your CSE7761 voltage/current and power sensors
|
|
with ESPHome. This sensor is commonly found in Sonoff Dual R3 v1.x.
|
|
|
|
.. note::
|
|
|
|
SAFETY HAZARD: Some devices such as Sonoff POWs/Shelly/etc, have the digital GND connected directly to mains voltage so **the GPIOs become LIVE during normal operation**. Our advice is to mark these boards to prevent any use of the dangerous digital pins.
|
|
|
|
As the communication with the CSE7761 done using UART, you need
|
|
to have an :ref:`UART bus <uart>` in your configuration with the ``tx_pin`` and ``rx_pin`` connected to the CSE7761.
|
|
Additionally, you need to set the baud rate to 38400 and parity to ``EVEN``.
|
|
|
|
.. code-block:: yaml
|
|
|
|
# Example configuration entry
|
|
sensor:
|
|
- platform: cse7761
|
|
voltage:
|
|
name: 'CSE7761 Voltage'
|
|
current_1:
|
|
name: 'CSE7761 Current 1'
|
|
current_2:
|
|
name: 'CSE7761 Current 2'
|
|
active_power_1:
|
|
name: 'CSE7761 Active Power 1'
|
|
active_power_2:
|
|
name: 'CSE7761 Active Power 2'
|
|
|
|
.. note::
|
|
|
|
The configuration above should work for Sonoff Dual R3 v1.x.
|
|
|
|
Configuration variables:
|
|
------------------------
|
|
|
|
- **voltage** (*Optional*): Use the voltage value of the sensor in V (RMS).
|
|
All options from :ref:`Sensor <config-sensor>`.
|
|
- **current_1** (*Optional*): Use the current value of the channel 1 in amperes. All options from
|
|
:ref:`Sensor <config-sensor>`.
|
|
- **current_2** (*Optional*): Use the current value of the channel 2 in amperes. All options from
|
|
:ref:`Sensor <config-sensor>`.
|
|
- **active_power_1** (*Optional*): Use the (active) power value of the channel 1 in watts. All options from
|
|
:ref:`Sensor <config-sensor>`.
|
|
- **active_power_2** (*Optional*): Use the (active) power value of the channel 2 in watts. All options from
|
|
:ref:`Sensor <config-sensor>`.
|
|
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
|
|
sensor. Defaults to ``60s``.
|
|
- **uart_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`UART Component <uart>` if you want
|
|
to use multiple UART buses.
|
|
|
|
See Also
|
|
--------
|
|
|
|
- :ref:`sensor-filters`
|
|
- :apiref:`cse7761/cse7761.h`
|
|
- :ghedit:`Edit`
|