Added timestamp to presence state and use mqtt instead of channel for overall presence
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-11-18 18:50:36 +01:00
parent 07fa5fc986
commit c49ee841fd
3 changed files with 80 additions and 53 deletions

View File

@@ -23,6 +23,7 @@ func Connect(config Config) MQTT {
opts.SetDefaultPublishHandler(defaultHandler)
opts.SetUsername(config.Username)
opts.SetPassword(config.Password)
opts.SetOrderMatters(false)
client := mqtt.NewClient(opts)
if token := client.Connect(); token.Wait() && token.Error() != nil {