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

LVGL cookbook #4110

Merged
merged 652 commits into from
Sep 15, 2024
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
652 commits
Select commit Hold shift + click to select a range
ec1810e
Update lvgl.rst
nagyrobi May 9, 2024
16e60f6
Update lvgl.rst
nagyrobi May 9, 2024
0348fec
Update components/sensor/lvgl.rst
nagyrobi May 10, 2024
24d4d40
Update components/sensor/lvgl.rst
nagyrobi May 10, 2024
66a3cda
Update components/text/lvgl.rst
nagyrobi May 10, 2024
7dc7536
Update components/binary_sensor/lvgl.rst
nagyrobi May 10, 2024
e38c372
Update components/sensor/lvgl.rst
nagyrobi May 10, 2024
1b6b8b1
Update components/sensor/lvgl.rst
nagyrobi May 10, 2024
544a9d0
Update components/lvgl.rst
nagyrobi May 10, 2024
9eef219
Update components/lvgl.rst
nagyrobi May 10, 2024
29d034e
Update components/text/lvgl.rst
nagyrobi May 10, 2024
cbbf074
Update components/text/lvgl.rst
nagyrobi May 10, 2024
e6fe794
Update components/display/index.rst
nagyrobi May 10, 2024
3aad18b
Update components/text/lvgl.rst
nagyrobi May 10, 2024
5a2874a
Update components/text_sensor/lvgl.rst
nagyrobi May 10, 2024
ebd765d
Update components/text_sensor/lvgl.rst
nagyrobi May 10, 2024
95dadb1
Update components/text_sensor/lvgl.rst
nagyrobi May 10, 2024
b4950ef
Update components/text_sensor/lvgl.rst
nagyrobi May 10, 2024
4a8a374
Update components/lvgl.rst
nagyrobi May 10, 2024
2846eef
Update components/lvgl.rst
nagyrobi May 10, 2024
950ef86
Update components/lvgl.rst
nagyrobi May 10, 2024
d5e20d8
Update components/lvgl.rst
nagyrobi May 10, 2024
9633024
Update components/lvgl.rst
nagyrobi May 10, 2024
30c44f5
Update components/lvgl.rst
nagyrobi May 10, 2024
af552a6
Update components/lvgl.rst
nagyrobi May 10, 2024
97c534a
Update components/lvgl.rst
nagyrobi May 10, 2024
dd4c969
Update components/lvgl.rst
nagyrobi May 10, 2024
a1c922f
Update components/lvgl.rst
nagyrobi May 10, 2024
eb93ce7
Update components/lvgl.rst
nagyrobi May 10, 2024
b8050b9
Update components/lvgl.rst
nagyrobi May 10, 2024
627e7f8
Update components/lvgl.rst
nagyrobi May 10, 2024
39b60a0
Update components/light/lvgl.rst
nagyrobi May 10, 2024
b0b29a8
Update components/light/lvgl.rst
nagyrobi May 10, 2024
829a5c3
Update components/light/lvgl.rst
nagyrobi May 10, 2024
de1fcba
Update components/lvgl.rst
nagyrobi May 10, 2024
8a9fd55
Update components/lvgl.rst
nagyrobi May 10, 2024
75710ef
Update components/lvgl.rst
nagyrobi May 10, 2024
7fe9dae
Update components/lvgl.rst
nagyrobi May 10, 2024
a52ad0b
Update components/lvgl.rst
nagyrobi May 10, 2024
10b3054
Update components/number/lvgl.rst
nagyrobi May 10, 2024
550f79e
Update components/number/lvgl.rst
nagyrobi May 10, 2024
19e639f
Apply suggestions from code review
nagyrobi May 10, 2024
3e53c9b
The one to one relation between widget and component :-)
nagyrobi May 10, 2024
8fa2e67
Update lvgl.rst
nagyrobi May 10, 2024
f54b360
Update lvgl.rst
nagyrobi May 10, 2024
e906760
Update lvgl.rst
nagyrobi May 10, 2024
d0bc87b
Update lvgl_c_txt.png
nagyrobi May 10, 2024
8d6a5be
keyboard widget
nagyrobi May 10, 2024
fb86bf3
Update components/lvgl.rst
nagyrobi May 10, 2024
3323a48
Apply suggestions from code review
nagyrobi May 10, 2024
c6b8e97
Update lvgl.rst
nagyrobi May 10, 2024
947e841
Update index.rst
nagyrobi May 10, 2024
9431a61
Update lvgl.rst
nagyrobi May 10, 2024
ba89b56
Update lvgl.rst
nagyrobi May 10, 2024
66fde50
options > variables
nagyrobi May 10, 2024
b980893
Update lvgl.rst
nagyrobi May 10, 2024
21d240d
Update index.rst
nagyrobi May 11, 2024
edd3659
Update index.rst
nagyrobi May 11, 2024
63bdf62
Update lvgl.rst
nagyrobi May 11, 2024
2b582a3
Update lvgl.rst
nagyrobi May 11, 2024
ee43433
Apply suggestions from code review
nagyrobi May 12, 2024
b175fdb
feature updates
nagyrobi May 12, 2024
444b301
Merge branch 'next' into lvgl-next-doc
nagyrobi May 13, 2024
85db605
added missing img options
nagyrobi May 13, 2024
5f26d80
Update lvgl.rst
nagyrobi May 13, 2024
542cc57
Apply suggestions from code review
nagyrobi May 13, 2024
0a6f620
Update lvgl.rst
nagyrobi May 13, 2024
1cdf2df
Merge branch 'lvgl-next-doc' of https://github.com/nagyrobi/esphome-d…
nagyrobi May 13, 2024
03abaa7
Update lvgl.rst
nagyrobi May 13, 2024
7de1ae5
Update lvgl.rst
nagyrobi May 13, 2024
02c3e32
Apply suggestions from code review
nagyrobi May 13, 2024
c1682e6
train
nagyrobi May 13, 2024
120f21a
Merge branch 'lvgl-next-doc' of https://github.com/nagyrobi/esphome-d…
nagyrobi May 13, 2024
4fd3002
Merge branch 'next' into lvgl-next-doc
nagyrobi May 13, 2024
f52b8b2
new tileview syntax
nagyrobi May 13, 2024
a55eebf
adding tabview
nagyrobi May 13, 2024
72ab067
Grid layout added
nagyrobi May 13, 2024
7980582
Flex layout cookbook example
nagyrobi May 13, 2024
d570317
Update lvgl.rst
nagyrobi May 13, 2024
f67bd7c
Update lvgl.rst
nagyrobi May 13, 2024
5cb1ad6
Update lvgl.rst
nagyrobi May 13, 2024
a7980fe
Update lvgl.rst
nagyrobi May 13, 2024
ed9843a
Merge branch 'next' into lvgl-next-doc
nagyrobi May 14, 2024
c577ca5
Apply suggestions from code review
nagyrobi May 15, 2024
9d2f207
Merge branch 'next' into lvgl-next-doc
nagyrobi May 15, 2024
a439bf3
grid layout
nagyrobi May 15, 2024
a9b4e49
grid to cookbook
nagyrobi May 15, 2024
687f6ed
Update lvgl.rst
nagyrobi May 15, 2024
7a0dbde
Update lvgl.rst
nagyrobi May 15, 2024
481e50a
Update lvgl.rst
nagyrobi May 15, 2024
1d7eb48
Update lvgl.rst
nagyrobi May 15, 2024
654ceaf
Update lvgl.rst
nagyrobi May 15, 2024
1bb898c
Update lvgl.rst
nagyrobi May 15, 2024
3e02f2b
flex / grid crosslinx
nagyrobi May 15, 2024
91aaf67
Update lvgl.rst
nagyrobi May 15, 2024
462467a
Update lvgl.rst
nagyrobi May 15, 2024
360fa71
removal of binary_output config from the lvgl switch platform
nagyrobi May 17, 2024
44b6e47
Merge branch 'next' into lvgl-next-doc
nagyrobi May 17, 2024
146bfa8
Update lvgl.rst
nagyrobi May 17, 2024
de4a42f
Apply suggestions from code review
nagyrobi May 19, 2024
d585852
Update lvgl.rst
nagyrobi May 19, 2024
d573f53
Update lvgl.rst
nagyrobi May 19, 2024
3fdc317
Update lvgl.rst
nagyrobi May 20, 2024
ed2e624
Merge branch 'next' into lvgl-next-doc
nagyrobi May 21, 2024
0b02b4e
Update lvgl.rst
nagyrobi May 21, 2024
63bfb7b
Update lvgl.rst
nagyrobi May 21, 2024
4779f19
rotary_encoder changes
nagyrobi May 21, 2024
ecf8a87
Update lvgl.rst
nagyrobi May 21, 2024
4421402
Merge branch 'next' into lvgl-next-doc
nagyrobi May 22, 2024
002a998
capitals for special values
nagyrobi May 22, 2024
e0c7cb9
cookbook capitals and additions
nagyrobi May 22, 2024
9a9c60e
adding keypads config
nagyrobi May 22, 2024
208de0c
Update lvgl.rst
nagyrobi May 22, 2024
f31a672
Update lvgl.rst
nagyrobi May 22, 2024
855df83
Update lvgl.rst
nagyrobi May 22, 2024
2ce20b7
Update lvgl_msgbox.png
nagyrobi May 22, 2024
1b91084
layout clarifications
nagyrobi May 22, 2024
8db563e
positioning clarifications
nagyrobi May 22, 2024
6bfe6ab
tip
nagyrobi May 22, 2024
05863cb
cookbook weather panel
nagyrobi May 22, 2024
26409a8
weather tweaks
nagyrobi May 22, 2024
afe37c3
Update lvgl_cook_weather.png
nagyrobi May 22, 2024
3ff112e
layout crosslink to the cookbook
nagyrobi May 22, 2024
5a85dac
Update lvgl_cook_weather.png
nagyrobi May 22, 2024
b1972bf
Update lvgl.rst
nagyrobi May 22, 2024
765882d
Update lvgl.rst
nagyrobi May 22, 2024
7f2357c
Merge branch 'next' into lvgl-next-doc
nagyrobi May 22, 2024
a8a34f7
Merge branch 'next' into lvgl-next-doc
nagyrobi May 23, 2024
b5ce253
final tweaks
nagyrobi May 23, 2024
3047c63
Merge branch 'lvgl-next-doc' of https://github.com/nagyrobi/esphome-d…
nagyrobi May 23, 2024
de21933
Update lvgl_cook_weather.png
nagyrobi May 23, 2024
24611f2
inclusion in automations guide list
nagyrobi May 23, 2024
41caf12
Update lvgl.rst
nagyrobi May 23, 2024
ea9e1d3
how to fix the missing checkmark with other font as default
nagyrobi May 24, 2024
e3bbb56
Merge branch 'next' into lvgl-next-doc
nagyrobi May 24, 2024
65bf368
notes based on feedback received on Discord
nagyrobi May 24, 2024
598929d
Merge branch 'next' into lvgl-next-doc
nagyrobi May 24, 2024
faf9c47
Update lvgl.rst
nagyrobi May 25, 2024
9d33a42
color_depth correction
nagyrobi May 26, 2024
dc1afc9
Merge branch 'next' into lvgl-next-doc
nagyrobi May 28, 2024
284a346
Update lvgl.rst
nagyrobi May 30, 2024
44f9cab
Cleaned up some config option descriptions.
clydebarrow May 31, 2024
f988dcc
Merge branch 'next' into lvgl-next-doc
clydebarrow May 31, 2024
1dce4c5
Merge branch 'next' into lvgl-next-doc
nagyrobi Jun 3, 2024
f92e0a1
Update lvgl.rst
nagyrobi Jun 3, 2024
7ee1787
fix typos in lvgl platforms
nagyrobi Jun 3, 2024
2537fe6
Merge branch 'next' into lvgl-next-doc
clydebarrow Jun 4, 2024
dbdc963
Merge branch 'next' into lvgl-next-doc
nagyrobi Jun 10, 2024
2b2724a
use new logos in boot screen
nagyrobi Jun 10, 2024
bbdee94
Merge branch 'next' into lvgl-next-doc
nagyrobi Jun 10, 2024
545fc52
Merge branch 'next' into lvgl-next-doc
nagyrobi Jun 17, 2024
096a1d4
Update automations.rst
nagyrobi Jun 17, 2024
ac88b84
Merge branch 'next' into lvgl-next-doc
nagyrobi Jun 20, 2024
328da5f
Clarify some `img` settings
nagyrobi Jun 20, 2024
d014f03
pivots are in pixels
nagyrobi Jun 20, 2024
9483616
Update lvgl.rst
nagyrobi Jun 20, 2024
2b85515
Merge branch 'next' into lvgl-next-doc
nagyrobi Jun 27, 2024
e7c60a1
update automation hyperlinks
nagyrobi Jun 28, 2024
cb658cf
Merge branch 'next' into lvgl-next-doc
nagyrobi Jul 9, 2024
5c110f2
lvgl.indicator.update explanation fix
nagyrobi Jul 10, 2024
0e986a6
Merge branch 'next' into lvgl-next-doc
nagyrobi Jul 15, 2024
b062c2b
Merge branch 'next' into lvgl-next-doc
nagyrobi Jul 17, 2024
7ef39f9
tabview index
nagyrobi Jul 17, 2024
51569e7
Update lvgl.rst
nagyrobi Jul 17, 2024
d79ff12
Start migration to LVGL v9
nagyrobi Jul 19, 2024
645ace7
Update lvgl.rst
nagyrobi Jul 19, 2024
0ac72ed
linterfixes
nagyrobi Jul 19, 2024
e24abdb
rename to lvgl_buttonmatrix.png
nagyrobi Jul 19, 2024
e2e4aec
Update lvgl.rst
nagyrobi Jul 19, 2024
1ebd729
Merge branch 'next' into lvgl-next-doc
nagyrobi Jul 22, 2024
6a35c3c
Merge branch 'next' into lvgl-next-doc
nagyrobi Jul 24, 2024
208d8aa
Merge pull request #8 from nagyrobi/lvgl9-next-doc
nagyrobi Jul 28, 2024
add934f
correct version, it's still 8
nagyrobi Jul 28, 2024
b5c8ebe
Update lvgl.rst
nagyrobi Jul 28, 2024
96fca57
Update lvgl.rst
nagyrobi Jul 29, 2024
229c665
Merge branch 'next' into lvgl-next-doc
nagyrobi Jul 29, 2024
9fa204b
Update lvgl.rst
nagyrobi Jul 29, 2024
d1df8a4
Merge branch 'next' into lvgl-next-doc
nagyrobi Jul 30, 2024
cef31bf
Merge branch 'next' into lvgl-next-doc
nagyrobi Jul 31, 2024
690b603
add ID option docs to actions
nagyrobi Jul 31, 2024
199cd0c
Merge branch 'lvgl-next-doc' of https://github.com/nagyrobi/esphome-d…
nagyrobi Jul 31, 2024
3f8cb79
Update lvgl.rst
nagyrobi Jul 31, 2024
c4bd712
Update lvgl.rst
nagyrobi Jul 31, 2024
f574e95
Update lvgl.rst
nagyrobi Jul 31, 2024
79cff49
Update lvgl.rst
nagyrobi Jul 31, 2024
cc649b3
Update lvgl.rst
nagyrobi Aug 5, 2024
88ac712
Update lvgl.rst
nagyrobi Aug 5, 2024
ead04c6
Merge branch 'next' into lvgl-next-doc
nagyrobi Aug 5, 2024
55ff061
Apply suggestions from code review
nagyrobi Aug 5, 2024
5d837e0
Update cookbook/lvgl.rst
nagyrobi Aug 5, 2024
2e80a1e
Update cookbook/lvgl.rst
nagyrobi Aug 5, 2024
a1e6d65
remove cookbook
nagyrobi Aug 5, 2024
aa06d64
add LVGL cookbook
nagyrobi Aug 5, 2024
2139bd0
Update lvgl.rst
nagyrobi Aug 5, 2024
bd1a177
`service` -> `action`
nagyrobi Aug 5, 2024
39aa9a7
Update components/lvgl.rst
nagyrobi Aug 6, 2024
816fd75
Update components/lvgl.rst
nagyrobi Aug 6, 2024
bedabc5
Update components/lvgl.rst
nagyrobi Aug 6, 2024
c7d2bde
Update components/lvgl.rst
nagyrobi Aug 6, 2024
0ed50b5
Update components/light/lvgl.rst
nagyrobi Aug 6, 2024
357d06d
LVGL initial, splitted doc
nagyrobi Aug 6, 2024
490c0fe
components
nagyrobi Aug 6, 2024
bbcdc5a
populate index
nagyrobi Aug 6, 2024
905dfab
crosslinx to the others
nagyrobi Aug 6, 2024
3bc1f09
image path fix
nagyrobi Aug 6, 2024
d420032
several image path fixes
nagyrobi Aug 6, 2024
b33134a
index fix
nagyrobi Aug 6, 2024
92a69ec
Update index.rst
nagyrobi Aug 6, 2024
753e926
toctree addition
nagyrobi Aug 6, 2024
3f5a0aa
longer anchor names
nagyrobi Aug 6, 2024
dbffdeb
number also
nagyrobi Aug 6, 2024
50b396b
longer anchor names
nagyrobi Aug 6, 2024
7fb451a
rotary_encoders is now just encoders
nagyrobi Aug 6, 2024
e453ef4
TOC optimizations
nagyrobi Aug 6, 2024
8669619
Update widgets.rst
nagyrobi Aug 6, 2024
3d4f44a
Update widgets.rst
nagyrobi Aug 6, 2024
2ee8827
action links
nagyrobi Aug 6, 2024
c2a5b37
Apply suggestions from code review
nagyrobi Aug 6, 2024
8df6f2c
Merge branch 'next' into lvgl-next-doc-mfl
nagyrobi Aug 6, 2024
488f714
longer anchors
nagyrobi Aug 6, 2024
f29d7bc
Merge branch 'lvgl-next-doc-mfl' of https://github.com/nagyrobi/espho…
nagyrobi Aug 6, 2024
f0f8b63
further anchor names extended
nagyrobi Aug 6, 2024
6998d22
TOC fixes
nagyrobi Aug 6, 2024
171fde6
Merge branch 'next' into pr/nagyrobi/3678
jesserockz Aug 6, 2024
af0888d
Merge branch 'lvgl-next-doc' into lvgl-next-doc-mfl
nagyrobi Aug 6, 2024
de9d429
Merge pull request #9 from nagyrobi/lvgl-next-doc-mfl
nagyrobi Aug 6, 2024
0b6063b
Delete lvgl.rst
nagyrobi Aug 6, 2024
351f537
Remove cookbook
kbx81 Aug 7, 2024
94a9157
Remove cookbook from `lint.py`, too
kbx81 Aug 7, 2024
1fe21c4
Fix up some labels
kbx81 Aug 7, 2024
bf14f04
Alphabetize a bunch of stuff
kbx81 Aug 7, 2024
841ac30
Add back cookbook
kbx81 Aug 8, 2024
5d7def9
Merge branch 'lvgl-next-cookbook' of https://github.com/nagyrobi/esph…
nagyrobi Aug 8, 2024
f74bd77
Update local light exanple
nagyrobi Aug 8, 2024
de2903c
Add note about default group.
clydebarrow Aug 11, 2024
5b33dc6
Remove duplicate image files
jesserockz Aug 11, 2024
a3a042d
Change ref to doc and remove whitespace
jesserockz Aug 11, 2024
2f3bcf2
Revert valve movement (Should be own PR)
jesserockz Aug 11, 2024
3f9973f
Revert unrelated whitespace changes
jesserockz Aug 11, 2024
2c810b5
Revert unrelated whitespace changes
jesserockz Aug 11, 2024
df26088
Revert unrelated whitespace changes
jesserockz Aug 11, 2024
6a62fb4
More ref -> doc
jesserockz Aug 11, 2024
3d5bb6a
More ref -> doc
jesserockz Aug 11, 2024
deddf22
Merge branch 'lvgl-next-doc' into lvgl-next-cookbook
kbx81 Aug 12, 2024
d1ae682
Merge branch 'next' into lvgl-next-cookbook
kbx81 Aug 12, 2024
9b48f47
Fix a couple links
kbx81 Aug 12, 2024
942079c
Merge branch 'next' into lvgl-next-cookbook
nagyrobi Aug 22, 2024
569f84c
Merge branch 'current' into lvgl-next-cookbook
nagyrobi Aug 22, 2024
fd19450
Merge branch 'current' into lvgl-next-cookbook
nagyrobi Aug 22, 2024
3fa2c2f
Merge pull request #10 from esphome/next
nagyrobi Sep 3, 2024
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: 8 additions & 1 deletion components/lvgl/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The graphic display should be configured with ``auto_clear_enabled: false`` and

For interactivity, a :doc:`Touchscreen </components/touchscreen/index>` (capacitive highly preferred), a :doc:`/components/sensor/rotary_encoder` or a custom keypad made up from discrete :doc:`Binary Sensors </components/binary_sensor/index>` can be used.

Check out the detailed examples in :ref:`the Cookbook <lvgl-cookbook>` which demonstrate a number of ways you can integrate your environment with LVGL and ESPHome.

Basics
------
Expand Down Expand Up @@ -145,6 +146,7 @@ The following configuration variables apply to the main ``lvgl`` component, in o
align: CENTER
text: 'Hello World!'

See :ref:`lvgl-cookbook-navigator` in the Cookbook for an example which demonstrates how to implement a page navigation bar at the bottom of the screen.

.. _lvgl-color:

Expand Down Expand Up @@ -175,6 +177,7 @@ You can use :ref:`fonts configured normally<display-fonts>`, the glyphs will be

For best results, set ``bpp: 4`` to get the glyphs rendered with proper anti-aliasing.

Check out :ref:`lvgl-cookbook-icontext`, :ref:`lvgl-cookbook-iconstat` and :ref:`lvgl-cookbook-iconbatt` in the Cookbook for examples which demonstrate how to use icons and text with TrueType/OpenType fonts.

**Library fonts**

Expand Down Expand Up @@ -376,6 +379,7 @@ So the precedence happens like this: state based styles override the locally spe

Feel free to experiment to discover inheritance and precedence of the styles based on states between the nested widgets.

:ref:`lvgl-cookbook-theme` The Cookbook contains an example which demonstrates how to implement a gradient style for your widgets.

.. _lvgl-layouts:

Expand All @@ -386,6 +390,7 @@ Layouts aim to position widgets automatically, eliminating the need to specify `

The layout configuration options are applied to any parent widget or page, influencing the appearance of the children. The position and size calculated by the layout overwrites the *normal* ``x``, ``y``, ``width``, and ``height`` settings of the children.

Check out :ref:`lvgl-cookbook-flex`, :ref:`lvgl-cookbook-grid` and :ref:`lvgl-cookbook-weather` in the Cookbook for examples which demonstrate how to automate widget positioning, potentially reducing the size of your device's YAML configuration, and saving you from lots of manual calculations.

The ``hidden``, ``ignore_layout`` and ``floating`` :ref:`flags <lvgl-widget-flags>` can be used on widgets to ignore them in layout calculations.

Expand Down Expand Up @@ -552,7 +557,7 @@ This :ref:`action <actions-action>` redraws the entire screen, or optionally onl

This :ref:`action <actions-action>` pauses the activity of LVGL, including rendering.

- **show_snow** (*Optional*, boolean): When paused, display random colored pixels across the entire screen in order to minimize screen burn-in, to relief the tension put on each individual pixel.
- **show_snow** (*Optional*, boolean): When paused, display random colored pixels across the entire screen in order to minimize screen burn-in, to relief the tension put on each individual pixel. See :ref:`lvgl-cookbook-antiburn` for an example which demonstrates how to use this.

.. code-block:: yaml

Expand Down Expand Up @@ -708,6 +713,7 @@ The ``on_idle`` :ref:`triggers <automation>` are activated when inactivity time
- light.turn_off: display_backlight
- lvgl.pause:

See :ref:`lvgl-cookbook-idlescreen` for an example which demonstrates how to implement screen saving with idle settings.

See Also
--------
Expand All @@ -718,6 +724,7 @@ See Also

*

- :doc:`LVGL Examples in the Cookbook </cookbook/lvgl>`
- :doc:`/components/display/index`
- :doc:`/components/touchscreen/index`
- :doc:`/components/sensor/rotary_encoder`
Expand Down
29 changes: 24 additions & 5 deletions components/lvgl/widgets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ To apply styles to the states, you need to specify them one level above, for exa

The state itself can be can be changed by interacting with the widget, or through :ref:`actions <lvgl-automation-actions>` with ``lvgl.widget.update``.

See :ref:`lvgl-cookbook-cover` for a cookbook example which demonstrates how to use styling and properties to show different states of a Home Assistant entity.

.. _lvgl-widget-flags:

In addition to visual styling, each widget supports some boolean **flags** to influence the behavior:
Expand Down Expand Up @@ -114,7 +116,7 @@ In addition to visual styling, each widget supports some boolean **flags** to in

.. note::

LVGL only supports **integers** for numeric ``value``. Visualizer widgets can't display floats directly, but they allow scaling by 10s.
LVGL only supports **integers** for numeric ``value``. Visualizer widgets can't display floats directly, but they allow scaling by 10s. Some examples in the :doc:`Cookbook </cookbook/lvgl>` cover how to do that.

Widget-specific properties
--------------------------
Expand Down Expand Up @@ -230,6 +232,8 @@ The animation image is similar to the normal ``image`` widget. The main differen
repeat_count: 100
duration: 300ms

See :ref:`lvgl-cookbook-animbatt` in the Cookbook for a more detailed example.

.. _lvgl-widget-arc:

``arc``
Expand Down Expand Up @@ -311,7 +315,9 @@ If the ``adv_hittest`` :ref:`flag <lvgl-widget-flags>` is enabled the arc can be

The ``on_value`` trigger is sent as the arc knob is dragged or changed with keys. The event is sent *continuously* while the arc knob is being dragged; this generally has a negative effect on performance. To mitigate this, consider using a :ref:`universal interaction trigger <lvgl-automation-triggers>` like ``on_release``, to get the ``x`` variable once after the interaction has completed.

The ``arc`` can be also integrated as :doc:`Number </components/number/lvgl>` or :doc:`Sensor </components/sensor/lvgl>` component.
The ``arc`` can be also integrated as a :doc:`Number </components/number/lvgl>` or :doc:`Sensor </components/sensor/lvgl>` component.

See :ref:`lvgl-cookbook-bright` and :ref:`lvgl-cookbook-volume` for examples which demonstrate how to use a slider (or an arc) to control entities in Home Assistant.

.. _lvgl-widget-bar:

Expand Down Expand Up @@ -432,6 +438,8 @@ To have a button with a text label on it, add a child :ref:`lvgl-widget-label` w

The ``button`` can be also integrated as a :doc:`Binary Sensor </components/binary_sensor/lvgl>` or as a :doc:`Switch </components/switch/lvgl>` component.

See :ref:`lvgl-cookbook-binent` for an example which demonstrates how to use a checkable button to act on a Home Assistant service.

.. _lvgl-widget-buttonmatrix:

``buttonmatrix``
Expand Down Expand Up @@ -562,7 +570,7 @@ The button matrix widget is a lightweight way to display multiple buttons in row

.. tip::

The Button Matrix widget supports the :ref:`key_collector` to collect the button presses as key press sequences for further automations.
The Button Matrix widget supports the :ref:`key_collector` to collect the button presses as key press sequences for further automations. Check out :ref:`lvgl-cookbook-keypad` for an example.

.. _lvgl-widget-checkbox:

Expand Down Expand Up @@ -622,7 +630,7 @@ The checkbox widget is made internally from a *tick box* and a label. When the c

.. note::

In case you configure ``default_font`` in the main section to a custom font, the checkmark will not be shown correctly when the checkbox is in the checked state.
In case you configure ``default_font`` in the main section to a custom font, the checkmark will not be shown correctly when the checkbox is in the checked state. See :ref:`lvgl-cookbook-ckboxmark` for how to easily resolve this.

The ``checkbox`` can be also integrated as a :doc:`Switch </components/switch/lvgl>` component.

Expand Down Expand Up @@ -954,6 +962,8 @@ The ``led`` can be also integrated as :doc:`Light </components/light/lvgl>` comp

If configured as a light component, ``color`` and ``brightness`` are overridden by the light at startup, according to its ``restore_mode`` setting.

Check out :ref:`lvgl-cookbook-keypad` in the Cookbook for an example which demonstrates how to change the ``led`` styling properties from an automation.

.. _lvgl-widget-line:

``line``
Expand Down Expand Up @@ -1102,6 +1112,8 @@ The meter widget can visualize data in very flexible ways. It can use arcs, need
id: temperature_needle
value: 3

See :ref:`lvgl-cookbook-gauge`, :ref:`lvgl-cookbook-thermometer` and :ref:`lvgl-cookbook-clock` in the Cookbook for examples which demonstrate how to effectively use this widget.

.. _lvgl-widget-msgbox:

``msgboxes``
Expand Down Expand Up @@ -1324,6 +1336,8 @@ Normally, the slider can be adjusted either by dragging the knob, or by clicking

The ``slider`` can be also integrated as :doc:`Number </components/number/lvgl>` or :doc:`Sensor </components/sensor/lvgl>` component.

See :ref:`lvgl-cookbook-bright` and :ref:`lvgl-cookbook-volume` for examples which demonstrate how to use a slider to control entities in Home Assistant.

.. _lvgl-widget-spinbox:

``spinbox``
Expand Down Expand Up @@ -1399,7 +1413,9 @@ The spinbox contains a numeric value (as text) which can be increased or decreas
format: "Spinbox value is %f"
args: [ x ]

The ``spinbox`` can be also integrated as :doc:`Number </components/number/lvgl>` or :doc:`Sensor </components/sensor/lvgl>` component.
The ``spinbox`` can be also integrated as a :doc:`Number </components/number/lvgl>` or :doc:`Sensor </components/sensor/lvgl>` component.

See :ref:`lvgl-cookbook-climate` for an example which demonstrates how to implement a thermostat control using the spinbox.

.. _lvgl-widget-spinner:

Expand Down Expand Up @@ -1493,6 +1509,8 @@ The switch looks like a little slider and can be used to turn something on and o

The ``switch`` can be also integrated as a :doc:`Switch </components/switch/lvgl>` component.

See :ref:`lvgl-cookbook-relay` for an example which demonstrates how to use a switch to act on a local component.

.. _lvgl-widget-tabview:

``tabview``
Expand Down Expand Up @@ -1743,6 +1761,7 @@ This powerful :ref:`action <actions-action>` allows changing/updating any widget
id: my_label_id
hidden: true

Check out in the Cookbook :ref:`lvgl-cookbook-binent` for an example which demonstrates how to use a template to update the state.

.. _lvgl-automation-shorthands:

Expand Down
Binary file added cookbook/images/lvgl_cook_animimg_batt.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cookbook/images/lvgl_cook_climate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cookbook/images/lvgl_cook_clock.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cookbook/images/lvgl_cook_cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cookbook/images/lvgl_cook_flex_layout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cookbook/images/lvgl_cook_font_batt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cookbook/images/lvgl_cook_font_binstat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cookbook/images/lvgl_cook_font_roboto_mdi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cookbook/images/lvgl_cook_gauge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cookbook/images/lvgl_cook_gradient_styles.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cookbook/images/lvgl_cook_keypad.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cookbook/images/lvgl_cook_pagenav.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cookbook/images/lvgl_cook_remligbut.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cookbook/images/lvgl_cook_statico.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cookbook/images/lvgl_cook_thermometer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cookbook/images/lvgl_cook_thermometer_gauge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cookbook/images/lvgl_cook_titlebar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cookbook/images/lvgl_cook_volume.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cookbook/images/lvgl_cook_weather.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading