1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-23 20:23:50 +01:00

Add Webserver Prometheus support for sensor, binary sensor, fan, light, cover and switch (#1032)

This commit is contained in:
Marvin Gaube
2020-06-10 03:00:12 +02:00
committed by GitHub
parent cd7af19e7c
commit f63fd9696f
8 changed files with 431 additions and 1 deletions

View File

@@ -3,6 +3,9 @@
#include "esphome/core/component.h"
#include "esphome/core/controller.h"
#include "esphome/components/web_server_base/web_server_base.h"
#ifdef WEBSERVER_PROMETHEUS
#include "esphome/components/web_server/web_server_prometheus.h"
#endif
#include <vector>
@@ -170,6 +173,10 @@ class WebServer : public Controller, public Component, public AsyncWebHandler {
const char *css_include_{nullptr};
const char *js_url_{nullptr};
const char *js_include_{nullptr};
#ifdef WEBSERVER_PROMETHEUS
WebServerPrometheus prometheus;
#endif
};
} // namespace web_server