document new key trigger (#4467)

Co-authored-by: Samuel Sieb <samuel@sieb.net>
This commit is contained in:
Samuel Sieb 2024-11-25 14:21:51 -10:00 committed by GitHub
parent 2ac95352f2
commit f464770315
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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