mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-10-31 08:31:29 +01:00
Fan is on is off conditions (#1436)
Co-authored-by: Chris Nussbaum <chris.nussbaum@protolabs.com>
This commit is contained in:
parent
7860b56a4b
commit
0b6094d503
@ -107,6 +107,25 @@ Configuration options:
|
|||||||
- **direction** (*Optional*, string, :ref:`templatable <config-templatable>`):
|
- **direction** (*Optional*, string, :ref:`templatable <config-templatable>`):
|
||||||
Set the diretion of the fan. Can be either ``forward`` or ``reverse``. Defaults to not changing the direction.
|
Set the diretion of the fan. Can be either ``forward`` or ``reverse``. Defaults to not changing the direction.
|
||||||
|
|
||||||
|
.. _fan-is_on_condition:
|
||||||
|
.. _fan-is_off_condition:
|
||||||
|
|
||||||
|
``fan.is_on`` / ``fan.is_off`` Condition
|
||||||
|
**********************************************
|
||||||
|
|
||||||
|
This :ref:`condition <config-condition>` passes if the given fan is on/off.
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
# in a trigger:
|
||||||
|
on_...:
|
||||||
|
if:
|
||||||
|
condition:
|
||||||
|
fan.is_on: my_fan
|
||||||
|
# same goes for is_off
|
||||||
|
then:
|
||||||
|
- script.execute: my_script
|
||||||
|
|
||||||
.. _fan-on_turn_on_off_trigger:
|
.. _fan-on_turn_on_off_trigger:
|
||||||
|
|
||||||
``fan.on_turn_on`` / ``fan.on_turn_off`` Trigger
|
``fan.on_turn_on`` / ``fan.on_turn_off`` Trigger
|
||||||
|
@ -402,6 +402,7 @@ All Conditions
|
|||||||
- :ref:`light.is_on <light-is_on_condition>` / :ref:`light.is_off <light-is_off_condition>`
|
- :ref:`light.is_on <light-is_on_condition>` / :ref:`light.is_off <light-is_off_condition>`
|
||||||
- :ref:`display.is_displaying_page <display-is_displaying_page-condition>`
|
- :ref:`display.is_displaying_page <display-is_displaying_page-condition>`
|
||||||
- :ref:`number.in_range <number-in_range_condition>`
|
- :ref:`number.in_range <number-in_range_condition>`
|
||||||
|
- :ref:`fan.is_on <fan-is_on_condition>` / :ref:`fan.is_off <fan-is_off_condition>`
|
||||||
|
|
||||||
All Lambda Calls
|
All Lambda Calls
|
||||||
----------------
|
----------------
|
||||||
|
Loading…
Reference in New Issue
Block a user