Skip to content

Commit

Permalink
document new key trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Sieb committed Nov 25, 2024
1 parent 4a4d0ae commit 39e8adc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions components/matrix_keypad.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 39e8adc

Please sign in to comment.