Was missing in https://github.com/openhab/openhab-addons/pull/10680
Fixes #10887
Signed-off-by: Stefan Triller <github@stefantriller.de>
private Stream<InfluxRow> mapRawResultToHistoric(FluxTable rawRow) {
return rawRow.getRecords().stream().map(r -> {
String itemName = (String) r.getValueByKey(InfluxDBConstants.TAG_ITEM_NAME);
+ if (itemName == null) { // use measurement name if item is not tagged
+ itemName = r.getMeasurement();
+ }
Object value = r.getValueByKey(COLUMN_VALUE_NAME_V2);
Instant time = (Instant) r.getValueByKey(COLUMN_TIME_NAME_V2);
return new InfluxRow(time, itemName, value);