Bug in senseBox-Binding

Tags: #<Tag:0x00007f1733143c68>

Hello,

i think there is a little bug in the senseBox-binding.
I have in my sensebox an additional soil-temperature and soil-moisture-sensor.
The sensebox-Binding reads this temp. and moist. value instead of the air-temperature and air-moisture-values.
At the moment there is no configuration-option to bind the channel to a fixed sensor-id.

Here is an json-example of my sensebox.

Best Regards
Mirko

[
   {
      "title": "Temperatur",
      "unit": "°C",
      "sensorType": "HDC1080",
      "icon": "osem-thermometer",
      "_id": "6005d07cca495d001be58efc",
      "lastMeasurement": {
         "value": "5.15",
         "createdAt": "2021-02-22T22:04:54.193Z"
      }
   },
   {
      "title": "rel. Luftfeuchte",
      "unit": "%",
      "sensorType": "HDC1080",
      "icon": "osem-humidity",
      "_id": "6005d07cca495d001be58efb",
      "lastMeasurement": {
         "value": "84.84",
         "createdAt": "2021-02-22T22:04:54.193Z"
      }
   },
   {
      "title": "Luftdruck",
      "unit": "hPa",
      "sensorType": "BMP280",
      "icon": "osem-barometer",
      "_id": "6005d07cca495d001be58efa",
      "lastMeasurement": {
         "value": "1010.80",
         "createdAt": "2021-02-22T22:04:54.193Z"
      }
   },
   {
      "title": "Beleuchtungsstärke",
      "unit": "lx",
      "sensorType": "TSL45315",
      "icon": "osem-brightness",
      "_id": "6005d07cca495d001be58ef9",
      "lastMeasurement": {
         "value": "3072.00",
         "createdAt": "2021-02-22T22:04:54.193Z"
      }
   },
   {
      "title": "UV-Intensität",
      "unit": "μW/cm²",
      "sensorType": "VEML6070",
      "icon": "osem-brightness",
      "_id": "6005d07cca495d001be58ef8",
      "lastMeasurement": {
         "value": "0.00",
         "createdAt": "2021-02-22T22:04:54.193Z"
      }
   },
   {
      "title": "PM10",
      "unit": "µg/m³",
      "sensorType": "SDS 011",
      "icon": "osem-cloud",
      "_id": "6005d07cca495d001be58ef7",
      "lastMeasurement": {
         "value": "20.70",
         "createdAt": "2021-02-22T22:04:54.193Z"
      }
   },
   {
      "title": "PM2.5",
      "unit": "µg/m³",
      "sensorType": "SDS 011",
      "icon": "osem-cloud",
      "_id": "6005d07cca495d001be58ef6",
      "lastMeasurement": {
         "value": "19.00",
         "createdAt": "2021-02-22T22:04:54.193Z"
      }
   },
   {
      "_id": "6005d07cca495d001be58ef5",
      "title": "Bodenfeuchte",
      "unit": "%",
      "sensorType": "SMT50",
      "icon": "osem-humidity",
      "lastMeasurement": {
         "value": "38.35",
         "createdAt": "2021-02-22T22:04:54.193Z"
      }
   },
   {
      "title": "Bodentemperatur",
      "unit": "°C",
      "sensorType": "SMT50",
      "icon": "osem-thermometer",
      "_id": "6005d07cca495d001be58ef4",
      "lastMeasurement": {
         "value": "3.50",
         "createdAt": "2021-02-22T22:04:54.193Z"
      }
   },
   {
      "_id": "6005d07cca495d001be58ef3",
      "title": "Lautstärke",
      "unit": "dB (A)",
      "sensorType": "SOUNDLEVELMETER",
      "icon": "osem-volume-up",
      "lastMeasurement": {
         "value": "35.77",
         "createdAt": "2021-02-22T22:04:54.193Z"
      }
   },
   {
      "_id": "6005d07cca495d001be58ef2",
      "title": "Windgeschwindigkeit",
      "unit": "km/h",
      "sensorType": "WINDSPEED",
      "icon": "osem-particulate-matter",
      "lastMeasurement": {
         "value": "12.48",
         "createdAt": "2021-02-22T22:04:54.193Z"
      }
   },
   {
      "_id": "6005d388ca495d001be70075",
      "title": "WiFi RSSI",
      "unit": "dBm",
      "sensorType": "WIFI",
      "icon": "osem-wifi",
      "lastMeasurement": {
         "value": "-44.00",
         "createdAt": "2021-02-22T22:04:54.193Z"
      }
   },
   {
      "_id": "6005d43bca495d001be756cc",
      "icon": "osem-sprinkles",
      "sensorType": "RAIN",
      "unit": "mm",
      "title": "Rain / Transmit"
   }
]

A quick read of the binding code appears to show that the binding expects to have only one temperature reading and one humidity reading. So the binding reads will read both, but only save the last one.