-
Notifications
You must be signed in to change notification settings - Fork 11
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
options for btnmatrix
#38
Comments
Already implemented.
Why? Each button in a button matrix can have its own actions. Although internally they are different to regular buttons, this is masked via the yaml config. |
For the users to easier implement something like key_collector to design an alarm input panel for example. With It's like when you need to input a sequence of numbers like a pin code - without having to define complicated scripts to concatenate incoming strings located in global variables. Also see #34 (comment) |
Tested, config passes through the schema, but doesn't have any effect. Multiple buttons can stay checked. |
Or maybe make |
Fixed. |
I think both need to know about each other @ssieb |
If the |
@ssieb Can you point out a sample in the code? |
Check out the |
@clydebarrow maybe we could add a config option |
That will work, no need for the config option, and it will just send the first character of the button label (key_provider can only send single characters.) |
Symbols are fine. If you want to send more than a single character, then just call the send method multiple times. |
@ssieb symbols here are graphical elements, not just *# keys. @clydebarrow I thought about config option because one may use multiple btnmatrix instances (eg page navigation etc) and likely wouldn't want to use key_provider with those. |
Symbols in the LVGL world are just Unicode strings. The btnmatrix won't send any keys unless it's connected to a key_collector. |
The key interface only handles |
Oh, you'd put at |
Yes. As with most things in esphome, if there's only one source, it will pick it up automatically, but otherwise, you need to specify the source id. |
Done. Works a treat. |
Recipe ready for the Cookbook: https://deploy-preview-3510--esphome.netlify.app/cookbook/lvgl#a-numeric-input-keypad |
one_checked
option from: https://docs.lvgl.io/8.3/widgets/core/btnmatrix.html#one-checkIt's for making possible to check only one button from the matrix. When you toggle a button, the others will be "de-toggled".
It would also be nice to complement this feature with the
select
functionality.also we need
on_value
trigger to retrieve in x the ID of the button that was pressed.The text was updated successfully, but these errors were encountered: