summaryrefslogtreecommitdiff
path: root/shelly.go
diff options
context:
space:
mode:
Diffstat (limited to 'shelly.go')
-rw-r--r--shelly.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/shelly.go b/shelly.go
index 508b393..2fa2fa6 100644
--- a/shelly.go
+++ b/shelly.go
@@ -9,7 +9,11 @@ import (
"github.com/gorilla/websocket"
)
-func ShellyRun(config ShellyConfigs, route Route) {
+func ShellyRun(config ShellyConfigs, tx chan MQTTMessage, route Route) {
+ for _, shelly := range config {
+ tx <- MQTTMessage{fmt.Sprintf("cover/%s", shelly.ID), []byte("exists"), true}
+ }
+
for message := range route.Destination {
ip, command, err := parseMessage(config, message)
if err != nil {