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

Allow mdns services to be exposed by config (#4202)

This commit is contained in:
Joakim Plate
2023-02-02 05:18:58 +01:00
committed by GitHub
parent e3d9c44bdc
commit 0554b06b7e
3 changed files with 58 additions and 1 deletions

View File

@@ -90,6 +90,8 @@ void MDNSComponent::compile_records_() {
}
#endif
this->services_.insert(this->services_.end(), this->services_extra_.begin(), this->services_extra_.end());
if (this->services_.empty()) {
// Publish "http" service if not using native API
// This is just to have *some* mDNS service so that .local resolution works