File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
smartapps/stj/mqtt-bridge.src Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -475,6 +475,8 @@ def initialize() {
475
475
476
476
// Update the bridge
477
477
updateSubscription()
478
+ // Auto-update every 30 minutes
479
+ schedule(" 0 0/30 * * * ?" , updateSubscription)
478
480
}
479
481
480
482
// Update the bridge"s subscription
@@ -489,6 +491,12 @@ def updateSubscription() {
489
491
}
490
492
settings[key]. each {device ->
491
493
attributes[attribute]. push(device. displayName)
494
+ // Send current value
495
+ inputHandler([
496
+ displayName : device. displayName,
497
+ value : device. currentState(attribute). value,
498
+ name : attribute
499
+ ])
492
500
}
493
501
}
494
502
}
@@ -500,7 +508,6 @@ def updateSubscription() {
500
508
])
501
509
502
510
log. debug " Updating subscription: ${ json} "
503
-
504
511
bridge. deviceNotification(json)
505
512
}
506
513
You can’t perform that action at this time.
0 commit comments