Skip to content

Commit

Permalink
Raw values access (#3729)
Browse files Browse the repository at this point in the history
  • Loading branch information
Swamp-Ig authored Apr 2, 2024
1 parent 14321df commit 6fa3868
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions components/binary_sensor/esp32_touch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,35 @@ Configuration variables:
wake-up from a touch event. Note that no filter(s) is/are active during deep sleep.
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.


Raw Values
----------

If access to the raw values is required, a template sensor can be created that polls for them:

.. code-block:: yaml
# Example configuration entry for accessing raw values
esp32_touch:
id: esp32_touch_1
binary_sensor:
- platform: esp32_touch
id: esp32_touch_pad
pin: GPIO4
threshold: 0
sensor:
- platform: template
name: "Raw touch value"
lambda: |-
return id(esp32_touch_pad).get_value();
update_interval: 3s
One example of use is a wide area pressure sensor that integrates a number of smaller sensors in an area. Make two strips
of aluminium foil that sandwich paper, and connect one wire to a touch pin and the other to ground. Set up several sensors
under a flexible object like a plastic mat, add the raw values, and apply a threshold.

.. _esp32-touch-pad-pins:

Touch Pad Pins
Expand Down

0 comments on commit 6fa3868

Please sign in to comment.