mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-12-26 17:27:47 +01:00
Add restore state option to template switch
This commit is contained in:
parent
ddb6105763
commit
fbf1e039e8
@ -46,14 +46,11 @@ Configuration variables:
|
||||
be performed when the remote (like Home Assistant's frontend) requests the switch to be turned on.
|
||||
- **turn_off_action** (*Optional*, :ref:`Action <config-action>`): The action that should
|
||||
be performed when the remote (like Home Assistant's frontend) requests the switch to be turned on.
|
||||
- **restore_state** (*Optional*, boolean): Sets whether esphomelib should attempt to restore the
|
||||
state on boot-up and call the turn on/off actions with the recovered values. Defaults to ``yes``.
|
||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
||||
- All other options from :ref:`Binary Sensor <config-binary_sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
|
||||
|
||||
.. note::
|
||||
|
||||
esphomelib will automatically try to restore the last state from flash on boot, it will then also call
|
||||
the turn on/off actions for you.
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user