Fan is on is off conditions (#1436)

Co-authored-by: Chris Nussbaum <chris.nussbaum@protolabs.com>
This commit is contained in:
Chris Nussbaum 2021-09-01 19:16:15 -05:00 committed by GitHub
parent 7860b56a4b
commit 0b6094d503
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 0 deletions

View File

@ -107,6 +107,25 @@ Configuration options:
- **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.
.. _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`` / ``fan.on_turn_off`` Trigger

View File

@ -402,6 +402,7 @@ All Conditions
- :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:`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
----------------