mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-01-26 22:21:38 +01:00
Added docs for pulse_counter total (#705)
This commit is contained in:
parent
69d2c695d6
commit
9c375048f3
@ -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 <config-sensor>`.
|
||||
|
||||
- All other options from :ref:`Sensor <config-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
|
||||
--------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user