1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-02 03:12:20 +01:00

Separate OTABackend from OTA component (#6459)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
Keith Burzinski
2024-05-15 21:01:09 -05:00
committed by GitHub
parent f91c31f093
commit f46c499c4e
40 changed files with 505 additions and 391 deletions

View File

@@ -3,28 +3,29 @@ wifi:
password: password1
ota:
safe_mode: true
password: "superlongpasswordthatnoonewillknow"
port: 3286
reboot_timeout: 2min
num_attempts: 5
on_begin:
then:
- logger.log: "OTA start"
on_progress:
then:
- logger.log:
format: "OTA progress %0.1f%%"
args: ["x"]
on_end:
then:
- logger.log: "OTA end"
on_error:
then:
- logger.log:
format: "OTA update error %d"
args: ["x"]
on_state_change:
then:
lambda: >-
ESP_LOGD("ota", "State %d", state);
- platform: esphome
safe_mode: true
password: "superlongpasswordthatnoonewillknow"
port: 3286
reboot_timeout: 2min
num_attempts: 5
on_begin:
then:
- logger.log: "OTA start"
on_progress:
then:
- logger.log:
format: "OTA progress %0.1f%%"
args: ["x"]
on_end:
then:
- logger.log: "OTA end"
on_error:
then:
- logger.log:
format: "OTA update error %d"
args: ["x"]
on_state_change:
then:
lambda: >-
ESP_LOGD("ota", "State %d", state);

View File

@@ -3,6 +3,8 @@ wifi:
password: password1
ota:
- platform: esphome
safe_mode: true
button:
- platform: safe_mode