1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-15 16:23:48 +01:00

Dashboard node import and render in browser (#2374)

This commit is contained in:
Otto Winter
2021-09-27 19:10:53 +02:00
committed by GitHub
parent 97e76d64d6
commit 45940b0514
8 changed files with 237 additions and 28 deletions

View File

@@ -6,6 +6,9 @@
#ifdef USE_API
#include "esphome/components/api/api_server.h"
#endif
#ifdef USE_DASHBOARD_IMPORT
#include "esphome/components/dashboard_import/dashboard_import.h"
#endif
namespace esphome {
namespace mdns {
@@ -42,6 +45,11 @@ std::vector<MDNSService> MDNSComponent::compile_services_() {
service.txt_records.push_back({"project_name", ESPHOME_PROJECT_NAME});
service.txt_records.push_back({"project_version", ESPHOME_PROJECT_VERSION});
#endif // ESPHOME_PROJECT_NAME
#ifdef USE_DASHBOARD_IMPORT
service.txt_records.push_back({"package_import_url", dashboard_import::get_package_import_url()});
#endif
res.push_back(service);
}
#endif // USE_API