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 @@ -508,6 +508,8 @@ def initialize() {
508
508
509
509
// Update the bridge
510
510
updateSubscription()
511
+ // Auto-update every 30 minutes
512
+ schedule(" 0 0/30 * * * ?" , updateSubscription)
511
513
}
512
514
513
515
// Update the bridge"s subscription
@@ -522,6 +524,12 @@ def updateSubscription() {
522
524
}
523
525
settings[key]. each {device ->
524
526
attributes[attribute]. push(device. displayName)
527
+ // Send current value
528
+ inputHandler([
529
+ displayName : device. displayName,
530
+ value : device. currentState(attribute). value,
531
+ name : attribute
532
+ ])
525
533
}
526
534
}
527
535
}
@@ -533,7 +541,6 @@ def updateSubscription() {
533
541
])
534
542
535
543
log. debug " Updating subscription: ${ json} "
536
-
537
544
bridge. deviceNotification(json)
538
545
}
539
546
You can’t perform that action at this time.
0 commit comments