Add restore state from flash option (#181)
* Add restore state from flash option * Add reference
This commit is contained in:
parent
b21583682d
commit
d9544012c4
|
@ -51,8 +51,15 @@ Advanced options:
|
|||
is in.
|
||||
- **libraries** (*Optional*, list of libraries): A list of `platformio libraries <https://platformio.org/lib>`__
|
||||
to include in the project. See `platformio lib install <https://docs.platformio.org/en/latest/userguide/lib/cmd_install.html>`__.
|
||||
|
||||
ESP8266 Options:
|
||||
|
||||
- **board_flash_mode** (*Optional*, string): The `SPI flash mode <https://github.com/espressif/esptool/wiki/SPI-Flash-Modes>`__
|
||||
to use for the board. One of ``qio``, ``qout``, ``dio`` and ``dout``. Defaults to ``dout``.
|
||||
- **esp8266_restore_from_flash** (*Optional*, boolean): Whether to save & restore data from flash so
|
||||
that the device state can be restored across power cycles. Keep in mind that this will slowly
|
||||
wear out the flash (so if you have automations that repeatedly toggle a component do not use this
|
||||
option (flash usually supports 100 000 write cycles). Defaults to ``no``.
|
||||
|
||||
Automations:
|
||||
|
||||
|
|
|
@ -29,6 +29,8 @@ Configuration variables:
|
|||
- **name** (**Required**, string): The name for the switch.
|
||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
||||
- **restore_mode** (*Optional*): Control how the GPIO Switch attempts to restore state on bootup.
|
||||
For restoring on ESP8266s, also see ``esp8266_restore_from_flash`` in the
|
||||
:doc:`esphome section </components/esphome>`.
|
||||
|
||||
- ``RESTORE_DEFAULT_OFF`` (Default) - Attempt to restore state and default to OFF if not possible to restore.
|
||||
- ``RESTORE_DEFAULT_ON`` - Attempt to restore state and default to ON.
|
||||
|
|
Loading…
Reference in New Issue