From 13a1822c6eb367078a82f6b58918d4add63f8427 Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Fri, 23 Feb 2024 23:08:40 +0100 Subject: [PATCH] Fix namespace names --- .../nspanel_ha_blueprint_upload_tft/upload_tft.h | 4 ++-- esphome/nspanel_esphome_addon_upload_tft.yaml | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/components/nspanel_ha_blueprint_upload_tft/upload_tft.h b/components/nspanel_ha_blueprint_upload_tft/upload_tft.h index 0582451..78d688a 100644 --- a/components/nspanel_ha_blueprint_upload_tft/upload_tft.h +++ b/components/nspanel_ha_blueprint_upload_tft/upload_tft.h @@ -3,7 +3,7 @@ #include -namespace nspanel_ha_blueprint { +namespace nspanel_ha_blueprint_upload_tft { /** * Constructs the TFT file URL based on branch, model, default URL, and base URL. @@ -42,4 +42,4 @@ namespace nspanel_ha_blueprint { return url; // Return the constructed URL } -} // namespace nspanel_ha_blueprint +} // namespace nspanel_ha_blueprint_upload_tft diff --git a/esphome/nspanel_esphome_addon_upload_tft.yaml b/esphome/nspanel_esphome_addon_upload_tft.yaml index e3bd939..5bb5694 100644 --- a/esphome/nspanel_esphome_addon_upload_tft.yaml +++ b/esphome/nspanel_esphome_addon_upload_tft.yaml @@ -60,7 +60,10 @@ 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 = 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 = nspanel_ha_blueprint_upload_tft::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 @@ -73,7 +76,10 @@ button: entity_category: config on_press: - lambda: |- - upload_tft->execute(construct_tft_url("v${version}", tft_file_model->state, "${nextion_update_url}", "${nextion_update_base_url}").c_str()); + 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()); display: - id: !extend disp1