Add docs for new fan trigger: on_speed_set (#1447)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
dgtal1 2021-09-08 05:16:03 +02:00 committed by GitHub
parent a7cf2975b0
commit a00f85a274
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,6 +54,8 @@ Automation triggers:
when the fan is turned on. See :ref:`fan-on_turn_on_off_trigger`.
- **on_turn_off** (*Optional*, :ref:`Action <config-action>`): An automation to perform
when the fan is turned off. See :ref:`fan-on_turn_on_off_trigger`.
- **on_speed_set** (*Optional*, :ref:`Action <config-action>`): An automation to perform
when the fan speed is set/changed. See :ref:`fan-on_speed_set_trigger`.
.. _fan-toggle_action:
@ -144,6 +146,21 @@ if a command to turn the fan on or off already matches the current state.
on_turn_off:
- logger.log: "Fan Turned Off!"
.. _fan-on_speed_set_trigger:
``fan.on_speed_set`` Trigger
****************************************************
This trigger is activated each time the fan speed is changed. It will fire when the speed is either set via API e.g. in Home Assistant or locally by an automation or a lambda function.
.. code-block:: yaml
fan:
- platform: speed # or any other platform
# ...
on_speed_set:
- logger.log: "Fan Speed was changed!"
Full Fan Index
--------------