From 410d4b789d6c8c08be7e469cccd5c2814376b248 Mon Sep 17 00:00:00 2001 From: MichaelHeimann Date: Mon, 1 Apr 2024 01:09:15 +0200 Subject: [PATCH] add md5_url tp nspanel_esphome_prebuilt.yaml --- prebuilt/nspanel_esphome_prebuilt.yaml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/prebuilt/nspanel_esphome_prebuilt.yaml b/prebuilt/nspanel_esphome_prebuilt.yaml index 5a57821..b087c37 100644 --- a/prebuilt/nspanel_esphome_prebuilt.yaml +++ b/prebuilt/nspanel_esphome_prebuilt.yaml @@ -8,7 +8,6 @@ ##### PLEASE only make changes if it is necessary and also the required knowledge is available. ##### ##### For normal use with the Blueprint, no changes are necessary. ##### ##################################################################################################### ---- substitutions: device_name: nspanel wifi_ssid: nspanel @@ -33,8 +32,8 @@ api: url: string then: - ota_http.flash: + md5_url: !lambda return id(firmwaremd5_url).state; 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!"); @@ -51,8 +50,8 @@ button: on_press: then: - ota_http.flash: + md5_url: !lambda return id(firmwaremd5_url).state; url: !lambda return id(firmware_url).state; - verify_ssl: false - lambda: |- static const char *const TAG = "prebuilt.button.bt_firmware_update"; ESP_LOGE(TAG, "Firmware update failed!"); @@ -60,7 +59,7 @@ button: captive_portal: dashboard_import: - package_import_url: github://Blackymas/NSPanel_HA_Blueprint/prebuilt/nspanel_esphome_prebuilt.yaml@dev # Must be updated + package_import_url: github://MichaelHeimann/NSPanel_HA_Blueprint/prebuilt/nspanel_esphome_prebuilt.yaml@main # Must be updated import_full_config: false esp32_improv: @@ -76,7 +75,10 @@ esphome: then: - text_sensor.template.publish: id: firmware_url - state: https://raw.githubusercontent.com/Blackymas/NSPanel_HA_Blueprint/dev/prebuilt/nspanel_esphome_prebuilt.bin # Must be updated + state: https://github.com/MichaelHeimann/NSPanel_HA_Blueprint/raw/main/prebuilt/nspanel_esphome_prebuilt.bin # Must be updated + - text_sensor.template.publish: + id: firmwaremd5_url + state: https://github.com/MichaelHeimann/NSPanel_HA_Blueprint/raw/main/prebuilt/nspanel_esphome_prebuilt.bin.md5 improv_serial: @@ -108,9 +110,14 @@ text_sensor: update_interval: 60s internal: true icon: mdi:cloud-download + - id: firmwaremd5_url + name: Firmware update md5 hash - URL + platform: template + update_interval: 60s + internal: true + icon: mdi:cloud-download wifi: networks: !remove ap: {} power_save_mode: LIGHT # To make it compatible with BLE -...