mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-01-03 18:47:48 +01:00
44 lines
1.4 KiB
ReStructuredText
44 lines
1.4 KiB
ReStructuredText
|
Status LED
|
||
|
==========
|
||
|
|
||
|
The ``status_led`` hooks into all esphomelib components and can indicate the status of
|
||
|
the device. Specifically, it will:
|
||
|
|
||
|
- Blink slowly (about every second) when a **warning** is active. Warnings are active when for
|
||
|
example reading a sensor value fails temporarily or the WiFi/MQTT connections are disrupted.
|
||
|
- Blink quickly (multiple times per second) when an **error** is active. Errors indicate that
|
||
|
esphomelib has found an error while setting up. In most cases, esphomelib will still try to
|
||
|
recover from the error and continue with all other operations.
|
||
|
- Stay off otherwise.
|
||
|
|
||
|
.. code:: yaml
|
||
|
|
||
|
# Example configuration entry
|
||
|
status_led:
|
||
|
pin: GPIO2
|
||
|
|
||
|
Configuration variables:
|
||
|
------------------------
|
||
|
|
||
|
- **pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The
|
||
|
GPIO pin to operate the status LED on.
|
||
|
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
||
|
|
||
|
.. note::
|
||
|
|
||
|
If your LED is in an active-LOW mode (when it's on if the output is enabled), use the
|
||
|
``inverted`` option of the :ref:`Pin Schema <config-pin_schema>`:
|
||
|
|
||
|
.. code:: yaml
|
||
|
|
||
|
status_led:
|
||
|
pin:
|
||
|
number: D0
|
||
|
inverted: True
|
||
|
|
||
|
See Also
|
||
|
--------
|
||
|
|
||
|
- :doc:`API Reference </api/misc/status_led>`
|
||
|
- `Edit this page on GitHub <https://github.com/OttoWinter/esphomedocs/blob/current/esphomeyaml/components/status_led.rst>`__
|