mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-12-24 17:08:15 +01:00
extended mpr121 docs with debounce and thresholds config (#245)
* added debounce and threshold * extended and fixed documentation for thresholds * line to long * line to long list end * no spaces at lin end * Update mpr121.rst * default for touch release thresholds * Lint Co-authored-by: Otto Winter <otto@otto-winter.com>
This commit is contained in:
parent
25af89b9cc
commit
3fb7da3fb0
@ -25,12 +25,18 @@ required to be set up in your configuration for this sensor to work.
|
||||
mpr121:
|
||||
id: mpr121_component
|
||||
address: 0x5A
|
||||
touch_debounce: 1
|
||||
release_debounce: 1
|
||||
touch_threshold: 10
|
||||
release_threshold: 7
|
||||
|
||||
binary_sensor:
|
||||
- platform: mpr121
|
||||
id: touch_key0
|
||||
channel: 0
|
||||
name: "Touch Key 0"
|
||||
touch_threshold: 12
|
||||
release_threshold: 6
|
||||
|
||||
Configuration variables:
|
||||
------------------------
|
||||
@ -41,12 +47,21 @@ Base Configuration:
|
||||
|
||||
- **address** (*Optional*, integer): The i2c address of the sensor. Defaults to ``0x5A``.
|
||||
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor.
|
||||
- **touch_debounce** (*Optional*, integer): The minimum length before a touch is recognized. Range is from 0 to 7.
|
||||
Defaults to 0.
|
||||
- **release_debounce** (*Optional*, integer): The minimum length that no touch is recognized before a release event is created.
|
||||
Range is from 0 to 7. Defaults to 0.
|
||||
- **touch_threshold** (*Optional*, integer): The touch threshold for all channels. This defines the sensitivity for touch detection
|
||||
and should be between 5 and 30 (lower = more sensitive). Defaults to 12. Typically the touch threshold is a little bigger than the release threshold.
|
||||
- **release_threshold** (*Optional*, integer): The release defines the sensitivity for touch detection and should be between 5 and 30. Defaults to 6.
|
||||
|
||||
Binary Sensor Configuration:
|
||||
|
||||
- **name** (**Optional**, string): The name for the binary sensor.
|
||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
||||
- **channel** (*Required*, integer): The channel number at the mpr121 the touchkey is connected to.
|
||||
- **touch_threshold** (*Optional*, integer): A per-channel override of the global touch_threshold value. If not specified, uses the global value.
|
||||
- **release_threshold** (*Optional*, integer): A per-channel override of the global release_threshold value. If not specified, uses the global value.
|
||||
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.
|
||||
|
||||
See Also
|
||||
|
Loading…
Reference in New Issue
Block a user