diff --git a/components/esphome.rst b/components/esphome.rst index 4131fc7d23..cd07661bf3 100644 --- a/components/esphome.rst +++ b/components/esphome.rst @@ -51,8 +51,15 @@ Advanced options: is in. - **libraries** (*Optional*, list of libraries): A list of `platformio libraries `__ to include in the project. See `platformio lib install `__. + +ESP8266 Options: + - **board_flash_mode** (*Optional*, string): The `SPI flash mode `__ 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: diff --git a/components/switch/gpio.rst b/components/switch/gpio.rst index 954c723919..2d733c3183 100644 --- a/components/switch/gpio.rst +++ b/components/switch/gpio.rst @@ -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 `. - ``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.