mirror of
https://github.com/esphome/esphome.git
synced 2025-10-01 17:42:22 +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:
committed by
GitHub
parent
be16d10b7d
commit
765e641d08
@@ -18,5 +18,7 @@ CONFIG_SCHEMA = cv.Schema({
|
||||
def to_code(config):
|
||||
paren = yield cg.get_variable(config[CONF_WEB_SERVER_BASE_ID])
|
||||
|
||||
cg.add_define('USE_PROMETHEUS')
|
||||
|
||||
var = cg.new_Pvariable(config[CONF_ID], paren)
|
||||
yield cg.register_component(var, config)
|
||||
|
Reference in New Issue
Block a user