diff options
Diffstat (limited to '')
-rw-r--r-- | cmd/catbus-actuator-wakeonlan/main.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/catbus-actuator-wakeonlan/main.go b/cmd/catbus-actuator-wakeonlan/main.go index ada08a0..53da4d9 100644 --- a/cmd/catbus-actuator-wakeonlan/main.go +++ b/cmd/catbus-actuator-wakeonlan/main.go @@ -51,6 +51,10 @@ func main() { for topic := range config.MACsByTopic { token := broker.Subscribe(topic, mqtt.AtLeastOnce, func(_ mqtt.Client, msg mqtt.Message) { + if string(msg.Payload()) != "on" { + return + } + mac, ok := config.MACsByTopic[msg.Topic()] if !ok { return |