From 597e60d6f1724601a023ffa982f7b4a1f8d81bfe Mon Sep 17 00:00:00 2001 From: Jakob Date: Fri, 12 Dec 2025 17:53:50 +0100 Subject: [PATCH] chore: filter out entities with no values --- src/core/emsdevice.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/emsdevice.cpp b/src/core/emsdevice.cpp index 93a3f2bcb..41a53b3cb 100644 --- a/src/core/emsdevice.cpp +++ b/src/core/emsdevice.cpp @@ -1713,7 +1713,7 @@ std::string EMSdevice::get_metrics_prometheus(const int8_t tag) { continue; } // only count supported types - if (is_supported_type(dv.type)) { + if (dv.hasValue() && is_supported_type(dv.type)) { entity_count++; } } @@ -1725,7 +1725,7 @@ std::string EMSdevice::get_metrics_prometheus(const int8_t tag) { } // only process number, boolean and enum types - if (!is_supported_type(dv.type)) { + if (!dv.hasValue() || !is_supported_type(dv.type)) { continue; }