esphome-docs/esphomeyaml/components/fan/index.rst

99 lines
2.4 KiB
ReStructuredText
Raw Normal View History

2018-05-13 11:37:02 +02:00
Fan Component
=============
With the ``fan`` domain you can create components that appear as fans in
the Home Assistant frontend. A fan can be switched ON or OFF, optionally
has a speed setting (``LOW``, ``MEDIUM``, ``HIGH``) and can have an
oscillate output.
2018-06-01 18:10:00 +02:00
.. figure:: images/fan-ui.png
:align: center
:width: 70.0%
2018-05-13 11:37:02 +02:00
2018-06-01 18:10:00 +02:00
.. _config-fan:
2018-05-13 11:37:02 +02:00
Base Fan Configuration
~~~~~~~~~~~~~~~~~~~~~~
.. code:: yaml
fan:
- platform: ...
name: ...
Configuration variables:
2018-06-01 18:10:00 +02:00
- **name** (**Required**, string): The name of the fan.
- **oscillation_state_topic** (*Optional*, string): The topic to
publish fan oscillaiton state changes to.
- **oscillation_command_topic** (*Optional*, string): The topic to
receive oscillation commands on.
- **speed_state_topic** (*Optional*, string): The topic to publish fan
speed state changes to.
- **speed_command_topic** (*Optional*, string): The topic to receive
speedcommands on.
- All other options from :ref:`MQTT Component <config-mqtt-component>`.
.. _fan-toggle_action:
``fan.toggle`` Action
^^^^^^^^^^^^^^^^^^^^^
Toggles the ON/OFF state of the fan with the given ID when executed.
.. code:: yaml
on_...:
then:
- fan.toggle:
id: fan_1
.. _fan-turn_off_action:
``fan.turn_off`` Action
^^^^^^^^^^^^^^^^^^^^^^^
Turns the fan with the given ID off when executed.
.. code:: yaml
on_...:
then:
- fan.turn_off:
id: fan_1
.. _fan-turn_on_action:
``fan.turn_on`` Action
^^^^^^^^^^^^^^^^^^^^^^
Turns the fan with the given ID off when executed.
.. code:: yaml
on_...:
then:
- fan.turn_on:
2018-06-02 21:54:39 +02:00
id: fan_1
2018-06-01 18:10:00 +02:00
Configuration options:
2018-06-02 21:54:39 +02:00
- **id** (**Required**, :ref:`config-id`): The ID of the fan.
2018-06-01 18:10:00 +02:00
- **oscillating** (*Optional*, boolean, :ref:`templatable <config-templatable>`):
Set the oscillation state of the fan. Defaults to not affecting oscillation.
- **speed** (*Optional*, string, :ref:`templatable <config-templatable>`):
Set the speed setting of the fan. One of ``OFF``, ``LOW``, ``MEDIUM``, ``HIGH``.
If you template this value, return ``fan::FAN_SPEED_...``, for example ``fan::FAN_SPEED_HIGH``.
Full Fan Index
^^^^^^^^^^^^^^
- :doc:`API Reference </api/fan/index>`
2018-06-03 12:50:44 +02:00
- `Edit this page on GitHub <https://github.com/OttoWinter/esphomedocs/blob/master/esphomeyaml/components/fan/index.rst>`__
2018-06-01 18:10:00 +02:00
.. toctree::
:maxdepth: 1
binary.rst
speed.rst