Skip to content

Commit

Permalink
Added documentation for Open Metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Achim committed Apr 21, 2024
1 parent 8980255 commit a91f6c1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions examples/OneOpenAir/OpenMetrics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,29 +179,30 @@ String OpenMetrics::getPayload(void) {

if (_temp > -1001) {
add_metric("temperature",
"The ambient temperature as measured by the AirGradient SHT "
"The ambient temperature as measured by the AirGradient SHT / PMS "
"sensor, in degrees Celsius",
"gauge", "celsius");
add_metric_point("", String(_temp));
}
if (atmpCompensated > -1001) {
add_metric(
"temperature_compensated",
"The ambient temperature as measured by the AirGradient SHT / PMS",
"The compensated ambient temperature as measured by the AirGradient SHT / PMS "
"sensor, in degrees Celsius",
"gauge", "celsius");
add_metric_point("", String(atmpCompensated));
}
if (_hum >= 0) {
add_metric(
"humidity",
"The relative humidity as measured by the AirGradient SHT sensor",
"The relative humidity as measured by the AirGradient SHT sensor"
"gauge", "percent");
add_metric_point("", String(_hum));
}
if (ahumCompensated >= 0) {
add_metric(
"humidity_compensated",
"The relative humidity as measured by the AirGradient SHT / PMS sensor",
"The compensated relative humidity as measured by the AirGradient SHT / PMS sensor",
"gauge", "percent");
add_metric_point("", String(ahumCompensated));
}
Expand Down

0 comments on commit a91f6c1

Please sign in to comment.