Add 'pulse' light effect doc (#1067)

This commit is contained in:
Christian Ferbar 2021-04-28 05:05:19 +02:00 committed by GitHub
parent fcc3ea0f7f
commit d45572c5e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -370,6 +370,34 @@ entries with each having a unique name like so:
transition_length: 4s
update_interval: 5s
Pulse Effect
************
This effect makes a pulsating light. The period can be defined by ``update_interval``, the transition length with ``transition_length``. ``transition_length`` should be set to less than ``update_interval``, setting ``transition_length`` to ``1s`` and ``update_interval`` to ``2s`` will result in a transition from 0% to 100% lasting 1 second, 1 second full light, a transition from 100% to 0% for 1 second and off for 1 second.
.. code-block:: yaml
light:
- platform: ...
# ...
effects:
- pulse:
- pulse:
name: "Fast Puse"
transition_length: 0.5s
update_interval: 0.5s
- pulse:
name: "Slow Puse"
# transition_length: 1s # defaults to 1s
update_interval: 2s
Configuration variables:
- **name** (*Optional*, string): The name of the effect. Defaults to ``Pulse``.
- **transition_length** (*Optional*, :ref:`config-time`): The duration of each transition. Defaults to ``1s``.
- **update_interval** (*Optional*, :ref:`config-time`): The interval when the new transistion is started. Defaults to ``1s``.
Random Effect
*************