Mqtt parsing help

Dear community,
novice here. I’m struggling with something that looked easy at first glance…

I’ve a MQTT device that sends this json payload, under /tele/floor1/SENSOR


I can correctly parse this using this configuration

  data_format = "json_v2"
    topic = "tele/+/SENSOR"
    tags = "_/device/_"
    timestamp_path = "Time"
    timestamp_format = "2006-01-02T15:04:05"
    timestamp_timezone = "CET"
    measurement_name = "data_from_device"

      path = "EBC"
        path = "EBC.Temperature"
        type = "float"
        path = "EBC.Humidity"
        type = "float"

Now… sometimes the device may have an additional sensor so the payload becomes this


To handle the new values i’ve created one more config file which looks similar to the other

      path = "BME280"
        path = "BME280.Temperature"
        type = "float"
        path = "BME280.Pressure"
        type = "float"

No luck. Data get all merged down and I only see one value for temperature humidity or pressure, meaning that I can’t distinguish the different sensors.
I think I should use tags but I dont know how.
Thanks in advance!

Yep! you need to add a tag to differentiate between the two sensors or rename each metric.

I’m not great with gjson, but what you need to do is set the tag for each metric to be the object key (e.g. device=“BMP280” and device=“EBC2”)