mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-01-24 22:02:04 +01:00
document new key trigger (#4467)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
This commit is contained in:
parent
2ac95352f2
commit
f464770315
@ -34,6 +34,8 @@ Component
|
||||
- pin: GPIOXX
|
||||
keys: "123A456B789C*0#D"
|
||||
has_diodes: false
|
||||
on_key:
|
||||
- lambda: ESP_LOGI("KEY", "key %d pressed", x);
|
||||
|
||||
|
||||
Configuration variables:
|
||||
@ -81,6 +83,13 @@ Configuration variables:
|
||||
Either the ``row`` and ``col`` parameters, or the ``key`` parameter has to be provided.
|
||||
|
||||
|
||||
Automations:
|
||||
------------
|
||||
|
||||
- **on_key** (*Optional*, :ref:`Automation <automation>`): An automation to perform
|
||||
when a key has been pressed. The key is in a variable called ``x``.
|
||||
|
||||
|
||||
.. note::
|
||||
|
||||
Automatic handling of multiple keys (e.g. PIN code entry) is possible with the
|
||||
|
Loading…
Reference in New Issue
Block a user