Merge component nspanel_ha_blueprint_upload_tft into nspanel_ha_blueprint
This commit is contained in:
@@ -14,16 +14,6 @@ substitutions:
|
||||
nextion_update_url: "${nextion_update_base_url}/main/hmi/nspanel_blank.tft"
|
||||
##############################################
|
||||
|
||||
##### External components #####
|
||||
external_components:
|
||||
- source:
|
||||
type: git
|
||||
url: https://github.com/Blackymas/NSPanel_HA_Blueprint
|
||||
ref: v4.3.2
|
||||
components:
|
||||
- nspanel_ha_blueprint_upload_tft
|
||||
refresh: 300s
|
||||
|
||||
esphome:
|
||||
platformio_options:
|
||||
build_flags:
|
||||
@@ -62,10 +52,7 @@ api:
|
||||
// Trim trailing spaces
|
||||
auto endPos = clean_url.find_last_not_of(" \t");
|
||||
if (std::string::npos != endPos) clean_url = clean_url.substr(0, endPos + 1);
|
||||
if (clean_url.empty() or clean_url == "default") url = nspanel_ha_blueprint_upload_tft::construct_tft_url("v${version}",
|
||||
tft_file_model->state,
|
||||
"${nextion_update_url}",
|
||||
"${nextion_update_base_url}");
|
||||
if (clean_url.empty() or clean_url == "default") url = construct_tft_url("v${version}", tft_file_model->state, "${nextion_update_url}", "${nextion_update_base_url}");
|
||||
upload_tft->execute(url.c_str());
|
||||
# yamllint enable rule:comments-indentation
|
||||
|
||||
@@ -78,10 +65,7 @@ button:
|
||||
entity_category: config
|
||||
on_press:
|
||||
- lambda: |-
|
||||
upload_tft->execute(nspanel_ha_blueprint_upload_tft::construct_tft_url("v${version}",
|
||||
tft_file_model->state,
|
||||
"${nextion_update_url}",
|
||||
"${nextion_update_base_url}").c_str());
|
||||
upload_tft->execute(construct_tft_url("v${version}", tft_file_model->state, "${nextion_update_url}", "${nextion_update_base_url}").c_str());
|
||||
|
||||
display:
|
||||
- id: !extend disp1
|
||||
@@ -104,8 +88,6 @@ globals:
|
||||
restore_value: false
|
||||
initial_value: 'esphome::nextion::Nextion::TFTUploadResult::UNKNOWN'
|
||||
|
||||
nspanel_ha_blueprint_upload_tft:
|
||||
|
||||
script:
|
||||
- id: nextion_status
|
||||
mode: restart
|
||||
|
||||
Reference in New Issue
Block a user