mirror of
https://github.com/esphome/esphome.git
synced 2024-12-02 13:24:15 +01:00
8ef4aaa70e
Co-authored-by: Keith Burzinski <kbx81x@gmail.com> Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Co-authored-by: Edward Firmo <94725493+edwardtfn@users.noreply.github.com>
37 lines
865 B
YAML
37 lines
865 B
YAML
wifi:
|
|
ssid: MySSID
|
|
password: password1
|
|
|
|
ota:
|
|
- platform: http_request
|
|
verify_ssl: ${verify_ssl}
|
|
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);'
|
|
|
|
button:
|
|
- platform: template
|
|
name: Firmware update
|
|
on_press:
|
|
then:
|
|
- ota_http_request.flash:
|
|
md5_url: http://my.ha.net:8123/local/esphome/firmware.md5
|
|
url: http://my.ha.net:8123/local/esphome/firmware.bin
|
|
- logger.log: "This message should be not displayed (reboot)"
|