Add firmware update service
This commit is contained in:
@@ -26,6 +26,18 @@ packages:
|
||||
core_package: !include ./nspanel_esphome_core.yaml # Core package
|
||||
upload_tft_package: !include ./nspanel_esphome_addon_upload_tft.yaml # Core package
|
||||
|
||||
api:
|
||||
services:
|
||||
- service: firmware_update
|
||||
variables:
|
||||
url: string
|
||||
then:
|
||||
- ota_http.flash:
|
||||
url: !lambda return url.c_str();
|
||||
verify_ssl: false
|
||||
- lambda: |-
|
||||
static const char *const TAG = "prebuilt.button.bt_firmware_update";
|
||||
ESP_LOGE(TAG, "Firmware update failed!");
|
||||
button:
|
||||
- name: Factory reset
|
||||
platform: factory_reset
|
||||
|
||||
Reference in New Issue
Block a user