mirror of
https://github.com/esphome/esphome.git
synced 2024-11-25 00:18:11 +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>
38 lines
912 B
YAML
38 lines
912 B
YAML
<<: !include common_http_request.yaml
|
|
|
|
wifi:
|
|
ssid: MySSID
|
|
password: password1
|
|
|
|
ota:
|
|
- platform: http_request
|
|
esp8266_disable_ssl_support: true
|
|
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)"
|