mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-03-01 03:51:36 +01:00
Added documentation on selecting a specific frame in an animated gif (#2214)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
parent
746266b5f3
commit
68a4f07a06
@ -625,7 +625,7 @@ Animation
|
||||
*********
|
||||
|
||||
Allows to use animated images on displays. Animation inherits all options from the image component.
|
||||
It adds additional lambda methods: ``next_frame()`` and ``prev_frame()`` to change the shown picture of a gif.
|
||||
It adds additional lambda methods: ``next_frame()``, ``prev_frame()`` and ``set_frame()`` to change the shown picture of a gif.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
@ -636,7 +636,7 @@ It adds additional lambda methods: ``next_frame()`` and ``prev_frame()`` to chan
|
||||
|
||||
The animation can be rendered just like the image component with the ``image()`` function of the display component.
|
||||
|
||||
To show the next frame of the animation call ``id(my_animation).next_frame()``, to show the previous picture use ``id(my_animation).prev_frame()``.
|
||||
To show the next frame of the animation call ``id(my_animation).next_frame()``, to show the previous picture use ``id(my_animation).prev_frame()``. To show a specific picture use ``id(my_animation).set_frame(int frame)``.
|
||||
This can be combined with all Lambdas:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
Loading…
Reference in New Issue
Block a user