mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-12-26 17:27:47 +01:00
ili9341: document auto_clear_enabled flag (#1568)
Also reference in section about rendering engine. Co-authored-by: Tim Niemueller <timdn@google.com>
This commit is contained in:
parent
6a3c4ef63f
commit
12f0886920
@ -56,6 +56,8 @@ Configuration variables:
|
||||
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use for rendering the content on the display.
|
||||
See :ref:`display-engine` for more information.
|
||||
- **update_interval** (*Optional*, :ref:`config-time`): The interval to re-draw the screen. Defaults to ``5s``.
|
||||
- **auto_clear_enabled** (*Optional*, boolean): Whether to automatically clear the display in each loop (''true'', default),
|
||||
or to keep the existing display content (must overwrite explicitly, e.g., only on data change).
|
||||
- **pages** (*Optional*, list): Show pages instead of a single lambda. See :ref:`display-pages`.
|
||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
||||
|
||||
|
@ -35,7 +35,9 @@ individually.
|
||||
|
||||
So, first a few basics: When setting up a display platform in ESPHome there will be a configuration
|
||||
option called ``lambda:`` which will be called every time ESPHome wants to re-render the display.
|
||||
In there, you can write code like in any :ref:`lambda <config-lambda>` in ESPHome. Display
|
||||
In each cycle, the display is automatically cleared before the lambda is executed. You can disable
|
||||
this behavior by setting ``auto_clear_enabled: false``.
|
||||
In the lambda, you can write code like in any :ref:`lambda <config-lambda>` in ESPHome. Display
|
||||
lambdas are additionally passed a variable called ``it`` which represents the rendering engine object.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
Loading…
Reference in New Issue
Block a user