From 9c375048f3545f69336d7ffbfcad29bf1c7cee0e Mon Sep 17 00:00:00 2001 From: Frank Bakker Date: Sun, 1 Nov 2020 08:45:33 +0100 Subject: [PATCH] Added docs for pulse_counter total (#705) --- components/sensor/pulse_counter.rst | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/components/sensor/pulse_counter.rst b/components/sensor/pulse_counter.rst index 73e25f5fe..32c096659 100644 --- a/components/sensor/pulse_counter.rst +++ b/components/sensor/pulse_counter.rst @@ -47,6 +47,10 @@ Configuration variables: - **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``. - **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. + +- **total** (*Optional*): Report the total number of pulses + All options from :ref:`Sensor `. + - All other options from :ref:`Sensor `. .. note:: @@ -73,6 +77,31 @@ count the light pulses on a power meter, you can do the following: filters: - multiply: 0.06 + +Counting total pulses +--------------------- + +When the total sensor is configured, the pulse_counter also reports the total +number of pulses measured. When used on a power meter, this can be used to +measure the total consumed energy in kWh. + +.. code-block:: yaml + + # Example configuration entry + sensor: + - platform: pulse_counter + pin: 12 + unit_of_measurement: 'kW' + name: 'Power Meter House' + filters: + - multiply: 0.06 + + total: + unit_of_measurement: 'kWh' + name: 'Energy Meter House' + filters: + - multiply: 0.001 + See Also --------