mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-01-12 20:10:50 +01:00
Pulse Width
This commit is contained in:
parent
d23b7e5736
commit
367e8576bc
@ -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>`.
|
||||
|
36
components/sensor/pulse_width.rst
Normal file
36
components/sensor/pulse_width.rst
Normal 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`
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user