You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/lvgl/index.rst
+37-2Lines changed: 37 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -108,8 +108,10 @@ The following configuration variables apply to the main ``lvgl`` component, in o
108
108
- **touchscreen_id** (**Required**, :ref:`config-id`): ID of a touchscreen configuration related to a display.
109
109
- **long_press_time** (*Optional*, :ref:`Time <config-time>`): For the touchscreen, delay after which the ``on_long_pressed`` :ref:`interaction trigger <lvgl-automation-triggers>` will be called. Defaults to ``400ms``.
110
110
- **long_press_repeat_time** (*Optional*, :ref:`Time <config-time>`): For the touchscreen, repeated interval after ``long_press_time``, when ``on_long_pressed_repeat`` :ref:`interaction trigger <lvgl-automation-triggers>` will be called. Defaults to ``100ms``.
111
+
- **groups** (*Optional*, list, string): All available groups for widgets, encoders and keypads. See the :doc:`common properties </components/lvgl/widgets>` of the widgets for more information on groups.
112
+
- **default_group** (*Optional*, string): The default group for widgets, encoders and keypads. If not specified, the first group in the ``groups`` list will be used. LVGL will automatically assign widgets, encoders and keypads to this group if no group is specified in their configuration.
111
113
- **encoders** (*Optional*, list): A list of rotary encoders interacting with the LVGL widgets on the display.
112
-
- **group** (*Optional*, string): A name for a group of widgets which will interact with the the input device. See the :doc:`common properties </components/lvgl/widgets>` of the widgets for more information on groups.
114
+
- **group** (*Optional*, string): A name for a group of widgets which will interact with the the input device. This **must** match one of the groups defined in the `groups` list. See the :doc:`common properties </components/lvgl/widgets>` of the widgets for more information on groups.
113
115
- **initial_focus** (*Optional*, :ref:`config-id`): An optional ID for a widget to be given focus on startup (especially useful if there is only one focusable widget.)
114
116
- **enter_button** (**Required**, :ref:`config-id`): The ID of a :doc:`Binary Sensor </components/binary_sensor/index>`, to be used as ``ENTER`` key.
115
117
- **sensor** (*Optional*, :ref:`config-id`): The ID of a :doc:`/components/sensor/rotary_encoder`; or a list with buttons for left/right interaction with the widgets:
@@ -118,7 +120,7 @@ The following configuration variables apply to the main ``lvgl`` component, in o
118
120
- **long_press_time** (*Optional*, :ref:`Time <config-time>`): For the rotary encoder, delay after which the ``on_long_pressed`` :ref:`interaction trigger <lvgl-automation-triggers>` will be called. Defaults to ``400ms``. Can be disabled with ``never``.
119
121
- **long_press_repeat_time** (*Optional*, :ref:`Time <config-time>`): For the rotary encoder, repeated interval after ``long_press_time``, when ``on_long_pressed_repeat`` :ref:`interaction trigger <lvgl-automation-triggers>` will be called. Defaults to ``100ms``. Can be disabled with ``never``.
120
122
- **keypads** (*Optional*, list): A list of keypads interacting with the LVGL widgets on the display.
121
-
- **group** (*Optional*, string): A name for a group of widgets which will interact with the the input device. See the :doc:`common properties </components/lvgl/widgets>` of the widgets for more information on groups.
123
+
- **group** (*Optional*, string): A name for a group of widgets which will interact with the the input device. This **must** match one of the groups defined in the `groups` list. See the :doc:`common properties </components/lvgl/widgets>` of the widgets for more information on groups.
122
124
- **up** (*Optional*, :ref:`config-id`): The ID of a :doc:`Binary Sensor </components/binary_sensor/index>`, to be used as ``UP`` key.
123
125
- **down** (*Optional*, :ref:`config-id`): The ID of a :doc:`Binary Sensor </components/binary_sensor/index>`, to be used as ``DOWN`` key.
124
126
- **right** (*Optional*, :ref:`config-id`): The ID of a :doc:`Binary Sensor </components/binary_sensor/index>`, to be used as ``RIGHT`` key.
@@ -926,6 +928,39 @@ The ``mark`` action will save the currently focused widget within the group, and
926
928
then:
927
929
- lvgl.widget.focus: previous
928
930
931
+
``lvgl.encoder.set_group``
932
+
*********************
933
+
934
+
This :ref:`action <actions-action>` sets the group for an encoder. This is useful for organizing encoders into specific groups for focused input handling.
935
+
936
+
- **id** (**Required**): The ID of the encoder to be configured.
937
+
- **group** (**Required**): The name of the group to assign the encoder to. This must match one of the groups defined in the `groups` list.
938
+
939
+
.. code-block:: yaml
940
+
941
+
on_...:
942
+
then:
943
+
- lvgl.encoder.set_group:
944
+
id: my_encoder
945
+
group: encoder_group
946
+
947
+
948
+
``lvgl.keypad.set_group``
949
+
*********************
950
+
951
+
This :ref:`action <actions-action>` sets the group for a keypad. This is useful for organizing keypads into specific groups for focused input handling.
952
+
953
+
- **id** (**Required**): The ID of the keypad to be configured.
954
+
- **group** (**Required**): The name of the group to assign the keypad to. This must match one of the groups defined in the `groups` list.
0 commit comments