######################## ##### EXPERIMENTAL ##### ######################## ##################################################################################################### ##### NSPANEL ESPHOME created by Blackymas - https://github.com/Blackymas/NSPanel_HA_Blueprint ##### ##### ESPHOME PRE-BUILT ##### ##### 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 wifi_password: NSPanel_Blueprint pre_built: "true" ##### External components ##### external_components: - source: github://pr#5586 # Remove this and update min ver when that PR is released components: - ota_http refresh: 300s packages: core_package: !include ../esphome/nspanel_esphome_core.yaml upload_tft_package: !include ../esphome/nspanel_esphome_addon_upload_tft.yaml 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 disabled_by_default: true internal: false - id: bt_firmware_update name: Firmware update platform: template on_press: then: - ota_http.flash: 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!"); dashboard_import: package_import_url: github://Blackymas/NSPanel_HA_Blueprint/prebuilt/nspanel_esphome_prebuilt.yaml@dev # Must be updated import_full_config: false esp32_improv: authorizer: none esphome: name_add_mac_suffix: true project: name: esphome.NSPanel_HA_Blueprint version: "${version}" on_boot: - priority: 602.0 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 improv_serial: logger: baud_rate: 115200 ota: id: my_ota password: !remove ota_http: script: - id: !extend watchdog then: - lambda: |- static const char *const TAG = "prebuilt.script.watchdog"; ESP_LOGI(TAG, "Pre-built version: ${pre_built}"); select: - id: !extend tft_file_model platform: template options: - "NSPanel Blank" - "NSPanel EU" - "NSPanel US" - "NSPanel US Landscape" - "NSPanel EU (CJK languages)" - "NSPanel US (CJK languages)" - "NSPanel US Landscape (CJK languages)" initial_option: "NSPanel Blank" text_sensor: - id: firmware_url name: Firmware update - URL platform: template update_interval: 60s internal: true icon: mdi:cloud-download web_server: id: web_server_std auth: !remove wifi: ap: {} power_save_mode: LIGHT # To make it compatible with BLE ...