Skip to content

Commit 4db1159

Browse files
committed
Add documentation for new configuration and actions
1 parent b6b71f1 commit 4db1159

File tree

1 file changed

+37
-2
lines changed

1 file changed

+37
-2
lines changed

components/lvgl/index.rst

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,10 @@ The following configuration variables apply to the main ``lvgl`` component, in o
108108
- **touchscreen_id** (**Required**, :ref:`config-id`): ID of a touchscreen configuration related to a display.
109109
- **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``.
110110
- **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.
111113
- **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.
113115
- **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.)
114116
- **enter_button** (**Required**, :ref:`config-id`): The ID of a :doc:`Binary Sensor </components/binary_sensor/index>`, to be used as ``ENTER`` key.
115117
- **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
118120
- **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``.
119121
- **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``.
120122
- **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.
122124
- **up** (*Optional*, :ref:`config-id`): The ID of a :doc:`Binary Sensor </components/binary_sensor/index>`, to be used as ``UP`` key.
123125
- **down** (*Optional*, :ref:`config-id`): The ID of a :doc:`Binary Sensor </components/binary_sensor/index>`, to be used as ``DOWN`` key.
124126
- **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
926928
then:
927929
- lvgl.widget.focus: previous
928930
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.
955+
956+
.. code-block:: yaml
957+
958+
on_...:
959+
then:
960+
- lvgl.keypad.set_group:
961+
id: my_keypad
962+
group: keypad_group
963+
929964
930965
.. _lvgl-conditions:
931966

0 commit comments

Comments
 (0)