Merge component nspanel_ha_blueprint_upload_tft into nspanel_ha_blueprint

This commit is contained in:
Edward Firmo
2024-04-09 08:08:33 +02:00
parent 896f86ddab
commit 694ab4f98f
4 changed files with 14 additions and 44 deletions

View File

@@ -1,8 +1,10 @@
// upload_tft.cpp
#ifdef NSPANEL_HA_BLUEPRINT_ADDON_UPLOAD_TFT
#include "upload_tft.h"
namespace nspanel_ha_blueprint_upload_tft {
namespace nspanel_ha_blueprint {
std::string construct_tft_url(const std::string& branch, const std::string& model,
const std::string& defaultUrl, const std::string& baseUrl) {
@@ -25,4 +27,6 @@ namespace nspanel_ha_blueprint_upload_tft {
return text;
}
} // namespace nspanel_ha_blueprint_upload_tft
} // namespace nspanel_ha_blueprint
#endif // NSPANEL_HA_BLUEPRINT_ADDON_UPLOAD_TFT

View File

@@ -2,9 +2,11 @@
#pragma once
#ifdef NSPANEL_HA_BLUEPRINT_ADDON_UPLOAD_TFT
#include <string>
namespace nspanel_ha_blueprint_upload_tft {
namespace nspanel_ha_blueprint {
/**
* Constructs the TFT file URL based on branch, model, default URL, and base URL.
@@ -27,4 +29,6 @@ namespace nspanel_ha_blueprint_upload_tft {
*/
std::string getNSPanelText(int displayMode, int charset);
} // namespace nspanel_ha_blueprint_upload_tft
} // namespace nspanel_ha_blueprint
#endif // NSPANEL_HA_BLUEPRINT_ADDON_UPLOAD_TFT

View File

@@ -1,20 +0,0 @@
# __init__.py
import esphome.codegen as cg
import esphome.config_validation as cv
from esphome.core import coroutine_with_priority
CODEOWNERS = ["@edwardtfn"]
nspanel_ha_blueprint_upload_tft_ns = cg.esphome_ns.namespace(
'nspanel_ha_blueprint_upload_tft'
)
CONFIG_SCHEMA = cv.All(
cv.Schema({}),
)
@coroutine_with_priority(1.0)
async def to_code(config):
cg.add_define("USE_NSPANEL_HA_BLUEPRINT_UPLOAD_TFT")
cg.add_global(nspanel_ha_blueprint_upload_tft_ns.using)