Telegraf mqtt_consumer topics with different types, how to skip some special topics from OpenDTU?

I´m using OpenDTU with MQTT and want to write all data to influxdb.
The configuration I´m using I found here.

[[inputs.mqtt_consumer]]
  name_override = "openDTU"
  servers = ["tcp://mosquitto:1883"]
  topics = ["solar/#"]
  data_format = "value"
  data_type = "float"
  tagexclude = ["host","topic"]
  [[inputs.mqtt_consumer.topic_parsing]]
    topic = "solar/+/+/+"
    tags = "_/name/channel/field"
  [[inputs.mqtt_consumer.topic_parsing]]
    topic = "solar/+/+"
    tags = "_/name/field"
  [[processors.pivot]]
  tag_key = "field"
  value_key = "value"

Description of MQTT-Topics
Most of the topics are float but some of them are strings, for example
solar/dtu/ip
solar/dtu/hostname
solar/<inverter_serial>/name
solar/<inverter_serial>device/fwbuilddatetime

Therefore the configuration produces errors like
E! [inputs.mqtt_consumer] Error in plugin: strconv.ParseFloat: parsing "OpenDTU-xxxxxx": invalid syntax

My idea is to simply drop these values because they aren´t needed. But I don´t know how to implement this!

@Nobodyman thanks for bringing this up. The big question is do you know which fields you will get or at least do you know which fields are string? I’m asking because if you explicitly know all string fields you could do:

[[inputs.mqtt_consumer]]
  name_override = "openDTU"
  servers = ["tcp://mosquitto:1883"]
  topics = ["solar/#"]
  data_format = "value"
  data_type = "string"
  tagexclude = ["host","topic"]
  [[inputs.mqtt_consumer.topic_parsing]]
    topic = "solar/+/+/+"
    tags = "_/name/channel/field"
  [[inputs.mqtt_consumer.topic_parsing]]
    topic = "solar/+/+"
    tags = "_/name/field"

[[processors.converter]]
  order = 1
  [processors.converter.tagdrop]
    field = ["ip", "hostname", "name", "fwbuilddatetime"]
  [processors.converter.fields]
    float = ["value"]

[[processors.pivot]]
  order = 2
  tag_key = "field"
  value_key = "value"

The idea is to keep the values as string in the MQTT plugin and later convert it to “float” dependent on the (later) field-name.