mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-02-02 23:31:30 +01:00
Add Safe Mode Restart Switch (#1504)
This commit is contained in:
parent
857477e188
commit
8bed2ede8d
@ -6,6 +6,8 @@ OTA Update Component
|
||||
:image: system-update.png
|
||||
:keywords: Xiaomi, Mi Flora, BLE, Bluetooth
|
||||
|
||||
.. _config-ota:
|
||||
|
||||
With the OTA (Over The Air) update component you can upload your
|
||||
firmware binaries to your node without having to use a USB cable for
|
||||
uploads. ESPHome natively supports this through its ``run`` and
|
||||
|
BIN
components/switch/images/safemode-ui.png
Executable file
BIN
components/switch/images/safemode-ui.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 4.5 KiB |
@ -30,6 +30,7 @@ See Also
|
||||
--------
|
||||
|
||||
- :doc:`shutdown`
|
||||
- :doc:`safe_mode`
|
||||
- :doc:`template`
|
||||
- :apiref:`restart/restart_switch.h`
|
||||
- :ghedit:`Edit`
|
||||
|
38
components/switch/safe_mode.rst
Normal file
38
components/switch/safe_mode.rst
Normal file
@ -0,0 +1,38 @@
|
||||
Safe Mode Switch
|
||||
================
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for setting up switches that can remotely reboot the ESP in ESPHome into safe mode.
|
||||
:image: restart.png
|
||||
|
||||
The ``safe_mode`` switch allows you to remotely reboot your node into :ref:`Safe Mode <config-ota>`. This is useful in certain situations
|
||||
where a misbehaving component is preventing Over-The-Air updates from completing successfully.
|
||||
|
||||
This component requires :ref:`OTA <config-ota>` to be configured.
|
||||
|
||||
.. figure:: images/safemode-ui.png
|
||||
:align: center
|
||||
:width: 80.0%
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry
|
||||
switch:
|
||||
- platform: safe_mode
|
||||
name: "Living Room Restart (Safe Mode)"
|
||||
|
||||
Configuration variables:
|
||||
------------------------
|
||||
|
||||
- **name** (**Required**, string): The name for the switch.
|
||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
||||
- All other options from :ref:`Switch <config-switch>`.
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :doc:`shutdown`
|
||||
- :doc:`restart`
|
||||
- :doc:`template`
|
||||
- :apiref:`safe_mode/safe_mode_switch.h`
|
||||
- :ghedit:`Edit`
|
1
images/restart-alert.svg
Normal file
1
images/restart-alert.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="mdi-restart-alert" width="24" height="24" viewBox="0 0 24 24"><path d="M10 4.03V.633L5 5.63L10 10.63V6.03C11.5 6.03 13.11 6.63 14.21 7.73C16.5 10.13 16.5 13.93 14.21 16.23C12.91 17.53 11.11 18.13 9.4 17.93L8.9 19.93C11.31 20.23 13.81 19.53 15.61 17.63C18.7 14.53 18.7 9.43 15.61 6.33C14.11 4.83 12.11 4.03 10 4.03M4.31 17.63C5.11 18.43 6 19.03 7 19.43L7.61 17.43C6.91 17.13 6.31 16.73 5.81 16.23C3.91 14.43 3.5 11.63 4.61 9.43L3.11 7.93C1.31 11.03 1.71 15.03 4.31 17.63M20 13H22V7H20V13M20 17H22V15H20V17Z" /></svg>
|
After Width: | Height: | Size: 752 B |
@ -443,6 +443,7 @@ Switch Components
|
||||
Switch Core, components/switch/index, folder-open.svg
|
||||
GPIO Switch, components/switch/gpio, pin.svg
|
||||
Restart Switch, components/switch/restart, restart.svg
|
||||
Safe Mode Switch, components/switch/safe_mode, restart-alert.svg
|
||||
Shutdown Switch, components/switch/shutdown, power_settings.svg
|
||||
Generic Output Switch, components/switch/output, upload.svg
|
||||
Template Switch, components/switch/template, description.svg
|
||||
|
Loading…
Reference in New Issue
Block a user