mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 23:21:54 +00:00 
			
		
		
		
	preen
This commit is contained in:
		| @@ -18,6 +18,8 @@ CODEOWNERS = ["@esphome/core"] | |||||||
| DEPENDENCIES = ["network"] | DEPENDENCIES = ["network"] | ||||||
|  |  | ||||||
| # Components that create mDNS services at runtime | # Components that create mDNS services at runtime | ||||||
|  | # IMPORTANT: If you add a new component here, you must also update the corresponding | ||||||
|  | # #ifdef blocks in mdns_component.cpp compile_records_() method | ||||||
| COMPONENTS_WITH_MDNS_SERVICES = ("api", "prometheus", "web_server") | COMPONENTS_WITH_MDNS_SERVICES = ("api", "prometheus", "web_server") | ||||||
|  |  | ||||||
| mdns_ns = cg.esphome_ns.namespace("mdns") | mdns_ns = cg.esphome_ns.namespace("mdns") | ||||||
|   | |||||||
| @@ -75,6 +75,9 @@ void MDNSComponent::compile_records_() { | |||||||
|   this->hostname_ = App.get_name(); |   this->hostname_ = App.get_name(); | ||||||
|   this->services_count_ = 0; |   this->services_count_ = 0; | ||||||
|  |  | ||||||
|  |   // IMPORTANT: The #ifdef blocks below must match COMPONENTS_WITH_MDNS_SERVICES | ||||||
|  |   // in mdns/__init__.py. If you add a new service here, update both locations. | ||||||
|  |  | ||||||
| #ifdef USE_API | #ifdef USE_API | ||||||
|   if (api::global_api_server != nullptr) { |   if (api::global_api_server != nullptr) { | ||||||
|     auto &service = this->services_[this->services_count_++]; |     auto &service = this->services_[this->services_count_++]; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user