Skip to content

add documentation for new deep_sleep button and switch #5100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: next
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions components/button/deep_sleep.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Deep_sleep Button
===============

.. seo::
:description: Instructions for setting up buttons that can remotely shut down the ESP.
:image: power_settings.svg

The ``deep_sleep`` button platform allows you to shutdown your node remotely
through Home Assistant. It does this by putting the node into deep sleep mode using the settings of the ``deep_sleep`` component.


.. figure:: images/shutdown-ui.png
:align: center
:width: 80.0%

.. code-block:: yaml

# Example configuration entry
button:
- platform: deep_sleep
name: "Living Room Shutdown"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think "Shutdown" is copy/paste mistake

override: true

Configuration variables:
------------------------

- All options from :ref:`Button <config-button>`.

See Also
--------

- :doc:`factory_reset`
- :doc:`/components/deep_sleep`
- :doc:`/components/switch/deep_sleep`
- :doc:`template`
- :apiref:`shutdown/shutdown_button.h`
- :ghedit:`Edit`
2 changes: 2 additions & 0 deletions components/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,7 @@ Button Components
Generic Output Button, components/button/output, upload.svg, dark-invert
Restart Button, components/button/restart, restart.svg, dark-invert
Safe Mode Button, components/button/safe_mode, restart-alert.svg, dark-invert
Deep_sleep Button, components/button/deep_sleep, power_settings.svg, dark-invert
Shutdown Button, components/button/shutdown, power_settings.svg, dark-invert
UART Button, components/button/uart, uart.svg
Wake-on-LAN, components/button/wake_on_lan, power_settings.svg, dark-invert
Expand Down Expand Up @@ -1002,6 +1003,7 @@ Switch Components
Nextion Switch, components/switch/nextion, nextion.jpg
Restart Switch, components/switch/restart, restart.svg, dark-invert
Safe Mode Switch, components/switch/safe_mode, restart-alert.svg, dark-invert
Deep_sleep Switch, components/switchdeep_sleep, power_settings.svg, dark-invert
Shutdown Switch, components/switch/shutdown, power_settings.svg, dark-invert
Tuya Switch, components/switch/tuya, tuya.png
UART Switch, components/switch/uart, uart.svg
Expand Down
33 changes: 33 additions & 0 deletions components/switch/deep_sleep.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Deep_sleep Switch
=================

.. seo::
:description: Instructions for setting up switches that can remotely shut down the ESP.
:image: power_settings.svg

The ``deep_sleep`` switch platform allows you to prevent the node to go to deep sleep.

.. figure:: images/shutdown-ui.png
:align: center
:width: 80.0%

.. code-block:: yaml

# Example configuration entry
switch:
- platform: deep_sleep
name: "Living Room Shutdown"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think "Shutdown" is copy/paste mistake


Configuration variables:
------------------------

- All options from :ref:`Switch <config-switch>`.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Description of ```override: true`` parameter is missing.


See Also
--------

- :doc:`/components/deep_sleep`
- :doc:`/components/button/deep_sleep`
- :doc:`template`
- :apiref:`deep_sleep/deep_sleep_switch.h`
- :ghedit:`Edit`
Loading