I’m using influxdb to collect data in two formats - boolean and float. Data of both types are stored under the same root topic name.
Using the documented syntax for mqtt_consumer, it seems I can only set a consumer to read one of these formats at a time, and any data received using the other format will result in an error.
I suppose I could declare two instances of the same consumer to do the writing and put up with lots of errors in both consumers but I would prefer something more elegant and efficient.
My best idea is to create a different parser type - call it ‘universal_value’ which would float or boolean dependent on the contents of the value message.
Does such a parser already exist?
Is there another way of doing this?