mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-11-16 10:55:21 +01:00
30 lines
641 B
ReStructuredText
30 lines
641 B
ReStructuredText
Shutdown Switch
|
|
===============
|
|
|
|
This platform allows you to put your ESP8266/ESP32 to sleep until it is manually restarted
|
|
by either pressing the reset button or toggling the power supply.
|
|
|
|
It is especially useful if you're using esphomelib with battery cells that must not
|
|
be discharged too much.
|
|
|
|
Example Usage
|
|
-------------
|
|
|
|
.. code-block:: cpp
|
|
|
|
App.make_shutdown_switch("Livingroom Shutdown");
|
|
|
|
.. cpp:namespace:: nullptr
|
|
|
|
See :cpp:func:`Application::make_shutdown_switch`.
|
|
|
|
API Reference
|
|
-------------
|
|
|
|
.. cpp:namespace:: nullptr
|
|
|
|
.. doxygenclass:: switch_::ShutdownSwitch
|
|
:members:
|
|
:protected-members:
|
|
:undoc-members:
|