Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document new key trigger #4467

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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