chore: filter out entities with no values

This commit is contained in:
Jakob
2025-12-12 17:53:50 +01:00
parent c11402195f
commit 597e60d6f1

View File

@@ -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;
} }