This commit is contained in:
Nicolas Duhamel 2022-10-28 19:38:23 +02:00
parent 6837a07beb
commit 1fa6e82ac1
4 changed files with 15 additions and 13 deletions

View File

@ -160,7 +160,7 @@ func (app *App) onSetStateMessage(ctx context.Context, msg mqttpaho.Message) {
Str("action", "onSetStateMessage").
Str("device", device_name).
Logger()
ctx = logger.WithContext(ctx)
// ctx = logger.WithContext(ctx)
var state device.DeviceState
if err := json.Unmarshal(msg.Payload(), &state); err != nil {

View File

@ -1,10 +1,11 @@
package mqtt
import (
"github.com/google/uuid"
"os"
"strings"
"time"
"github.com/google/uuid"
)
type Config struct {

View File

@ -2,6 +2,7 @@ package mqtt
import (
"context"
mqtt "github.com/eclipse/paho.mqtt.golang"
"github.com/sirupsen/logrus"
)