Skip to content

Commit 6620c5c

Browse files
committed
Fixed bad reference.
1 parent 3dce9a5 commit 6620c5c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

devicetypes/fireboy1919/milight-controller.src/milight-controller.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def refresh() {
117117
}
118118

119119
def httpCall(body, mac, ipAddress) {
120-
def group = evt.device.getPreferences()["group"]
120+
def group = getPreferences()["group"]
121121

122122
def path = "/gateways/$mac/rgbw/$group"
123123
log.debug("Sending to ${path}.")

smartapps/fireboy1919/mithings.src/mithings.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def switchOffHandler(evt) {
148148

149149
evt.device.httpCall(["status": "off" ], settings.ipAddress, settings.macAddress)
150150
//parent.httpCall(["status": "off" ], settings.ipAddress, settings.macAddress, evt);
151-
151+
152152
getChildDevices().each {
153153
it.off(false)
154154
}
@@ -166,10 +166,10 @@ def switchLevelHandler(evt) {
166166
def switchColorHandler(evt) {
167167
if(parent.settings.isDebug) { log.debug "color set! ${settings.macAddress} / ${evt.device.name} / ${evt.value}" }
168168

169-
evt.device.httpCall(["hue": evt.value ], settings.ipAddress, settings.macAddress );
170169
getChildDevices().each {
171170
it.setColor(evt.value, false)
172171
}
172+
return evt.device.httpCall(["hue": evt.value ], settings.ipAddress, settings.macAddress );
173173
}
174174

175175
def switchRefreshHandler(evt) {

0 commit comments

Comments
 (0)