aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cmd/catbus-actuator-wakeonlan/main.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd/catbus-actuator-wakeonlan/main.go b/cmd/catbus-actuator-wakeonlan/main.go
index 508d1cf..22157e9 100644
--- a/cmd/catbus-actuator-wakeonlan/main.go
+++ b/cmd/catbus-actuator-wakeonlan/main.go
@@ -37,22 +37,22 @@ func main() {
log.AddField("broker-uri", config.BrokerURI)
catbusOptions := catbus.ClientOptions{
- DisconnectHandler: func(_ *catbus.Client, err error) {
+ DisconnectHandler: func(_ catbus.Client, err error) {
log := log
if err != nil {
log = log.WithError(err)
}
log.Error("disconnected from MQTT broker")
},
- ConnectHandler: func(client *catbus.Client) {
+ ConnectHandler: func(client catbus.Client) {
log.Info("connected to MQTT broker")
for topic := range config.MACsByTopic {
- err := client.Subscribe(topic, func(_ *catbus.Client, msg catbus.Message) {
- if msg.Payload() != "on" {
+ err := client.Subscribe(topic, func(_ catbus.Client, msg catbus.Message) {
+ if msg.Payload != "on" {
return
}
- mac, ok := config.MACsByTopic[msg.Topic()]
+ mac, ok := config.MACsByTopic[msg.Topic]
if !ok {
return
}