From f4ef8e40811da6877411ff0670f13a83cef91e2a Mon Sep 17 00:00:00 2001 From: andig Date: Tue, 20 May 2025 20:28:23 +0200 Subject: [PATCH] Mqtt: empty topic disables publishing --- cmd/root.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/root.go b/cmd/root.go index 7af4be40f..ba81e9d24 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -230,7 +230,7 @@ func runRoot(cmd *cobra.Command, args []string) { valueChan <- util.Param{Key: keys.Startup, Val: true} // setup mqtt publisher - if err == nil && conf.Mqtt.Broker != "" { + if err == nil && conf.Mqtt.Broker != "" && conf.Mqtt.Topic != "" { var mqtt *server.MQTT mqtt, err = server.NewMQTT(strings.Trim(conf.Mqtt.Topic, "/"), site) if err == nil {