Pulse Width

This commit is contained in:
Otto Winter 2019-05-25 09:08:05 +02:00
parent d23b7e5736
commit 367e8576bc
No known key found for this signature in database
GPG Key ID: DB66C0BE6013F97E
3 changed files with 40 additions and 3 deletions

View File

@ -1,7 +1,7 @@
Custom Climate
==============
This integration can be used to create custom switches in ESPHome
This integration can be used to create custom climate devices in ESPHome
using the C++ (Arduino) API.
Please first read :doc:`/components/sensor/custom` guide,
@ -54,7 +54,7 @@ And in YAML:
# Example configuration entry
esphome:
includes:
- my_switch.h
- my_climate.h
climate:
- platform: custom
@ -70,7 +70,7 @@ Configuration variables:
- **lambda** (**Required**, :ref:`lambda <config-lambda>`): The lambda to run for instantiating the
climate(s).
- **switches** (**Required**, list): A list of switches to initialize. The length here
- **climates** (**Required**, list): A list of climates to initialize. The length here
must equal the number of items in the ``return`` statement of the ``lambda``.
- All options from :ref:`Climate <config-climate>`.

View File

@ -0,0 +1,36 @@
Pulse Width Sensor
==================
.. seo::
:description: Instructions for setting up pulse width sensors in ESPHome
:image: pulse.png
The ``pulse_width`` sensor allows you to measure how long a given digital signal
is HIGH. For example this can be used to measure PWM signals to transmit some
value over a simple protocol.
.. code-block:: yaml
# Example configuration entry
sensor:
- platform: pulse_width
pin: D0
name: Pulse Width Sensor
Configuration variables:
------------------------
- **pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The pin to observe for the
pulse width.
- **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>`.
See Also
--------
- :ref:`sensor-filters`
- :apiref:`pulse_width/pulse_width.h`
- :ghedit:`Edit`

View File

@ -119,6 +119,7 @@ Sensor Components
MS5611, components/sensor/ms5611, ms5611.jpg
PMSX003, components/sensor/pmsx003, pmsx003.svg
Pulse Counter, components/sensor/pulse_counter, pulse.svg
Pulse Width, components/sensor/pulse_width, pulse.svg
Rotary Encoder, components/sensor/rotary_encoder, rotary_encoder.jpg
SDS011 Sensor, components/sensor/sds011, sds011.jpg
SHT3X-D, components/sensor/sht3xd, sht3xd.jpg