Enable '-1' for zone and group in topic regExp

This commit is contained in:
Siegfried Siegert 2020-11-22 12:29:53 +01:00
parent dc5d066698
commit 8e95443548

View File

@ -124,8 +124,8 @@ var subscriptionHandler = func(client MQTT.Client, msg MQTT.Message) {
//-------------------------------------------------------------------
// create ID from topic
regexpWithType := "\\/ATB\\/[A-Z]+\\/[0-9]+\\/[0-9]+\\/mo"
regexpDefault := "\\/ATB\\/[0-9]+\\/[0-9]+\\/[0-9]+\\/[0-9]+\\/mo"
regexpWithType := "ATB\\/[A-Z]+\\/[\\-]*[0-9]+\\/[\\-]*[0-9]+\\/mo"
regexpDefault := "ATB\\/[0-9]+\\/[\\-]*[0-9]+\\/[\\-]*[0-9]+\\/[0-9]+\\/mo"
topicSlice := strings.Split(msg.Topic(), "/")