mDNS: read host from config (#12664)

* mDNS: readd host from config

* leaner

---------

Co-authored-by: andig <cpuidle@gmx.de>
This commit is contained in:
Michael Geers 2024-03-08 06:40:51 +01:00 • committed by GitHub
parent 5723914b92
commit d794e89e63
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -542,7 +542,7 @@ func configureHEMS(conf config.Typed, site *core.Site, httpd *server.HTTPd) erro
func configureMDNS(conf networkConfig) error {
host := strings.TrimSuffix(conf.Host, ".local")
zc, err := zeroconf.RegisterProxy("EV Charge Controller", "_http._tcp", "local.", conf.Port, host, nil, []string{}, nil)
zc, err := zeroconf.RegisterProxy("evcc", "_http._tcp", "local.", conf.Port, host, nil, []string{"path=/"}, nil)
if err != nil {
return fmt.Errorf("mDNS announcement: %w", err)
}