diff --git a/cmd/config/config.go b/cmd/config/config.go index 7483ce911..fc8b7d32a 100644 --- a/cmd/config/config.go +++ b/cmd/config/config.go @@ -466,14 +466,10 @@ func (c Config) SetKVS(s string, defaultKVS map[string]KVS) error { tgt = subSystemValue[1] } - _, ok := c[subSys][tgt] - if !ok { - c[subSys][tgt] = KVS{} - } else { - c[subSys][tgt] = kvs - } + // Save client sent kvs + c[subSys][tgt] = kvs - _, ok = c[subSys][tgt].Lookup(State) + _, ok := c[subSys][tgt].Lookup(State) if !ok { // implicit state "on" if not specified. c[subSys][tgt] = append(c[subSys][tgt], KV{ diff --git a/cmd/config/notify/parse.go b/cmd/config/notify/parse.go index f83f9447e..abba0e058 100644 --- a/cmd/config/notify/parse.go +++ b/cmd/config/notify/parse.go @@ -564,6 +564,7 @@ func GetNotifyMQTT(mqttKVS map[string]config.KVS, rootCAs *x509.CertPool) (map[s if k != config.Default { brokerEnv = brokerEnv + config.Default + k } + brokerURL, err := xnet.ParseURL(env.Get(brokerEnv, kv.Get(target.MqttBroker))) if err != nil { return nil, err