Add firmware update service

This commit is contained in:
Edward Firmo
2024-01-15 19:55:25 +01:00
parent 284aa843b4
commit 17c200da53

View File

@@ -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