Fix on-boot (#1382)

This commit is contained in:
Alex 2021-08-19 15:24:30 -05:00 committed by GitHub
parent c5c2076b28
commit 2db1a32931
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -165,7 +165,7 @@ is already set up. You can however change this using the ``priority`` parameter.
esphome: esphome:
# ... # ...
on_boot: on_boot:
priority: -10 priority: 600
# ... # ...
then: then:
- switch.turn_off: switch_1 - switch.turn_off: switch_1
@ -174,7 +174,7 @@ Configuration variables:
- **priority** (*Optional*, float): The priority to execute your custom initialization code. A higher value - **priority** (*Optional*, float): The priority to execute your custom initialization code. A higher value
means a high priority and thus also your code being executed earlier. Please note this is an ESPHome-internal means a high priority and thus also your code being executed earlier. Please note this is an ESPHome-internal
value and any change will not be marked as a breaking change. Defaults to ``-10``. Priorities (you can use any value between them too): value and any change will not be marked as a breaking change. Defaults to ``600``. Priorities (you can use any value between them too):
- ``800.0``: This is where all hardware initialization of vital components is executed. For example setting switches - ``800.0``: This is where all hardware initialization of vital components is executed. For example setting switches
to their initial state. to their initial state.

View File

@ -16,7 +16,7 @@ Assistant configuration.
When enabling MQTT and you do *not* use the "native API" for Home Assistant, you must When enabling MQTT and you do *not* use the "native API" for Home Assistant, you must
remove the ``api:`` line from your ESPHome configuration, otherwise the ESP will remove the ``api:`` line from your ESPHome configuration, otherwise the ESP will
reboot every 5 minutes because no client connected to the native API. reboot every 15 minutes because no client connected to the native API.
.. code-block:: yaml .. code-block:: yaml