1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-13 00:32:20 +01:00

Fix mDNS webserver port and expose prometheus service (#1389)

* Expose right webserver port using mDNS.

80 is the default value but can be changed in the config file.
Add a new define for the port.

Signed-off-by: Richard Weinberger <richard@nod.at>

* Expose prometheus service via mDNS

That way prometheus auto discovery features can find us.

Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
richardweinberger
2020-12-14 21:14:38 +01:00
committed by GitHub
parent be16d10b7d
commit 765e641d08
3 changed files with 12 additions and 2 deletions

View File

@@ -36,6 +36,7 @@ def to_code(config):
yield cg.register_component(var, config)
cg.add(paren.set_port(config[CONF_PORT]))
cg.add_define('WEBSERVER_PORT', config[CONF_PORT])
cg.add(var.set_css_url(config[CONF_CSS_URL]))
cg.add(var.set_js_url(config[CONF_JS_URL]))
if CONF_AUTH in config: