mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-14 11:50:20 +03:00
chore: filter out entities with no values
This commit is contained in:
@@ -1713,7 +1713,7 @@ std::string EMSdevice::get_metrics_prometheus(const int8_t tag) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// only count supported types
|
// only count supported types
|
||||||
if (is_supported_type(dv.type)) {
|
if (dv.hasValue() && is_supported_type(dv.type)) {
|
||||||
entity_count++;
|
entity_count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1725,7 +1725,7 @@ std::string EMSdevice::get_metrics_prometheus(const int8_t tag) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// only process number, boolean and enum types
|
// only process number, boolean and enum types
|
||||||
if (!is_supported_type(dv.type)) {
|
if (!dv.hasValue() || !is_supported_type(dv.type)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user