mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 01:07:45 +01:00
List webserver service on MDNS if enabled. (#3662)
This commit is contained in:
parent
54427eac9a
commit
936c408a58
1 changed files with 10 additions and 0 deletions
|
@ -68,6 +68,16 @@ void MDNSComponent::compile_records_() {
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef USE_WEBSERVER
|
||||
{
|
||||
MDNSService service{};
|
||||
service.service_type = "_http";
|
||||
service.proto = "_tcp";
|
||||
service.port = USE_WEBSERVER_PORT;
|
||||
this->services_.push_back(service);
|
||||
}
|
||||
#endif
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue