Add initial_run to regular lambda effect (#1806)

This commit is contained in:
Jesse Hills 2022-01-21 11:09:11 +13:00 committed by GitHub
parent 16cdfe44dc
commit 021272ecee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -586,6 +586,10 @@ Lambda Effect
This effect allows you to write completely custom light effects yourself using :ref:`lambdas <config-lambda>`. This effect allows you to write completely custom light effects yourself using :ref:`lambdas <config-lambda>`.
Available variable in the lambda:
- **initial_run** - A bool which is true on the first execution of the lambda. Useful to reset static variables when restarting an effect.
.. code-block:: yaml .. code-block:: yaml
light: light:
@ -622,6 +626,7 @@ Configuration variables:
- **lambda** (**Required**, :ref:`lambda <config-lambda>`): The code to execute. ``static`` variables are - **lambda** (**Required**, :ref:`lambda <config-lambda>`): The code to execute. ``static`` variables are
especially useful. especially useful.
Addressable Rainbow Effect Addressable Rainbow Effect
************************** **************************