mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-12-24 17:08:15 +01:00
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:
parent
a7cf2975b0
commit
a00f85a274
@ -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
|
||||
--------------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user