######################## ##### 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" heater_relay: "1" # possible values: 1/2 temp_units: "°C" #Temperatures in Fahrenheit temp_min: "16" #Min supported temperature is 40°F temp_max: "26" #Max supported temperature is 80°F temp_step: "0.5" #Temperature granularity is 1°F ##### 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 climate_heat: !include ../esphome/nspanel_esphome_addon_climate_heat.yaml api: services: - service: firmware_update variables: url: string then: - ota_http.flash: md5_url: !lambda return id(firmwaremd5_url).state; url: !lambda return url.c_str(); - 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: md5_url: !lambda return id(firmwaremd5_url).state; url: !lambda return id(firmware_url).state; - lambda: |- static const char *const TAG = "prebuilt.button.bt_firmware_update"; ESP_LOGE(TAG, "Firmware update failed!"); #captive_portal: dashboard_import: package_import_url: github://MichaelHeimann/NSPanel_HA_Blueprint/prebuilt/nspanel_esphome_prebuilt.yaml@main 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/MichaelHeimann/NSPanel_HA_Blueprint/main/prebuilt/nspanel_esphome_prebuilt.bin - text_sensor.template.publish: id: firmwaremd5_url state: https://raw.githubusercontent.com/MichaelHeimann/NSPanel_HA_Blueprint/main/prebuilt/nspanel_esphome_prebuilt.bin.md5 esp32: framework: type: esp-idf sdkconfig_options: CONFIG_D0WD_PSRAM_CLK_IO: "5" CONFIG_D0WD_PSRAM_CS_IO: "18" CONFIG_ESP32_REV_MIN_3: "y" CONFIG_BT_ALLOCATION_FROM_SPIRAM_FIRST: "y" CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY: "y" CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC: "y" ONFIG_MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH: "y" CONFIG_MBEDTLS_DYNAMIC_BUFFER: "y" CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA: "y" CONFIG_MBEDTLS_DYNAMIC_FREE_CA_CERT: "y" CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP: "y" psram: # mode: quad speed: 80MHz improv_serial: logger: baud_rate: 115200 ota: id: my_ota password: !remove ota_http: 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)" text_sensor: - id: firmware_url name: Firmware update - URL platform: template 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