diff --git a/components/lvgl/index.rst b/components/lvgl/index.rst index 59f0944df0..33c932a4fa 100644 --- a/components/lvgl/index.rst +++ b/components/lvgl/index.rst @@ -108,8 +108,9 @@ The following configuration variables apply to the main ``lvgl`` component, in o - **touchscreen_id** (**Required**, :ref:`config-id`): ID of a touchscreen configuration related to a display. - **long_press_time** (*Optional*, :ref:`Time `): For the touchscreen, delay after which the ``on_long_pressed`` :ref:`interaction trigger ` will be called. Defaults to ``400ms``. - **long_press_repeat_time** (*Optional*, :ref:`Time `): For the touchscreen, repeated interval after ``long_press_time``, when ``on_long_pressed_repeat`` :ref:`interaction trigger ` will be called. Defaults to ``100ms``. +- **groups** (*Optional*, list, string): All available groups for widgets, encoders and keypads. See the :doc:`common properties ` of the widgets for more information on groups. - **encoders** (*Optional*, list): A list of rotary encoders interacting with the LVGL widgets on the display. - - **group** (*Optional*, string): A name for a group of widgets which will interact with the the input device. See the :doc:`common properties ` of the widgets for more information on groups. + - **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 ` of the widgets for more information on groups. - **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.) - **enter_button** (**Required**, :ref:`config-id`): The ID of a :doc:`Binary Sensor `, to be used as ``ENTER`` key. - **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 +119,7 @@ The following configuration variables apply to the main ``lvgl`` component, in o - **long_press_time** (*Optional*, :ref:`Time `): For the rotary encoder, delay after which the ``on_long_pressed`` :ref:`interaction trigger ` will be called. Defaults to ``400ms``. Can be disabled with ``never``. - **long_press_repeat_time** (*Optional*, :ref:`Time `): For the rotary encoder, repeated interval after ``long_press_time``, when ``on_long_pressed_repeat`` :ref:`interaction trigger ` will be called. Defaults to ``100ms``. Can be disabled with ``never``. - **keypads** (*Optional*, list): A list of keypads interacting with the LVGL widgets on the display. - - **group** (*Optional*, string): A name for a group of widgets which will interact with the the input device. See the :doc:`common properties ` of the widgets for more information on groups. + - **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 ` of the widgets for more information on groups. - **up** (*Optional*, :ref:`config-id`): The ID of a :doc:`Binary Sensor `, to be used as ``UP`` key. - **down** (*Optional*, :ref:`config-id`): The ID of a :doc:`Binary Sensor `, to be used as ``DOWN`` key. - **right** (*Optional*, :ref:`config-id`): The ID of a :doc:`Binary Sensor `, to be used as ``RIGHT`` key. @@ -926,6 +927,39 @@ The ``mark`` action will save the currently focused widget within the group, and then: - lvgl.widget.focus: previous +``lvgl.encoder.set_group`` +************************** + +This :ref:`action ` sets the group for an encoder. This is useful for organizing encoders into specific groups for focused input handling. + +- **id** (**Required**): The ID of the encoder to be configured. +- **group** (**Required**): The name of the group to assign the encoder to. This must match one of the groups defined in the `groups` list. + +.. code-block:: yaml + + on_...: + then: + - lvgl.encoder.set_group: + id: my_encoder + group: encoder_group + + +``lvgl.keypad.set_group`` +************************* + +This :ref:`action ` sets the group for a keypad. This is useful for organizing keypads into specific groups for focused input handling. + +- **id** (**Required**): The ID of the keypad to be configured. +- **group** (**Required**): The name of the group to assign the keypad to. This must match one of the groups defined in the `groups` list. + +.. code-block:: yaml + + on_...: + then: + - lvgl.keypad.set_group: + id: my_keypad + group: keypad_group + .. _lvgl-conditions: