esphome-docs/components/sensor/duty_cycle.rst
Otto Winter 8d9b0d2375
Netlify (#153)
* Netlify

* Fix

* Faster doxygen

* Update Makefile

* Try without api

* Debug

* Fix

* Update Makefile

* Debug

* Try 1.8.13

* Remove debug

* Update Makefile

* Optimize
2019-02-07 13:54:45 +01:00

44 lines
1.2 KiB
ReStructuredText

Duty Cycle Sensor
=================
.. seo::
:description: Instructions for setting up duty cycle sensors in esphomelib
:image: percent.png
The duty cycle sensor allows you to measure for what percentage of time a signal
on a GPIO pin is HIGH or LOW.
For example, you can measure if a status LED of a pool controller is permanently active
(indicating that the pump is on) or blinking.
.. figure:: images/duty_cycle-ui.png
:align: center
:width: 80.0%
.. code-block:: yaml
# Example configuration entry
sensor:
- platform: duty_cycle
pin: D0
name: Duty Cycle Sensor
Configuration variables:
------------------------
- **pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The pin to observe for the duty
cycle.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
See Also
--------
- :ref:`sensor-filters`
- :apiref:`sensor/duty_cycle_sensor.h`
- :ghedit:`Edit`
.. disqus::