I've implemented functionality to extract additional data from topic (labels and metric identifier) by using regular expression.
This addition can be useful with ESPHome MQTT client 'cause it generate topics that ends with 'state' for every sensor. Also it has parametrized topic prefix that can be used to extract additional labels for metric, i.e. location, device type etc.
Added SEPARATE_METRICS parameter to extract metric identifier from topic with regular expression defined in SEPARATE_METRIC_ID_REGEX parameter.
Added ADDITIONAL_LABELS parameters to extract labels from topic with regular expression defined in ADDITIONAL_LABELS_REGEX parameter.
I've implemented functionality to extract additional data from topic (labels and metric identifier) by using regular expression. This addition can be useful with ESPHome MQTT client 'cause it generate topics that ends with 'state' for every sensor. Also it has parametrized topic prefix that can be used to extract additional labels for metric, i.e. location, device type etc.