mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-03-08 05:31:56 +00:00
Merge pull request #102 from workingmonk/lifx_bug_fixes
lifx namespace and refresh interval issue
This commit is contained in:
@@ -62,6 +62,7 @@ def authPage() {
|
|||||||
|
|
||||||
def options = locationOptions() ?: []
|
def options = locationOptions() ?: []
|
||||||
def count = options.size()
|
def count = options.size()
|
||||||
|
def refreshInterval = 3
|
||||||
|
|
||||||
return dynamicPage(name:"Credentials", title:"Select devices...", nextPage:"", refreshInterval:refreshInterval, install:true, uninstall: true) {
|
return dynamicPage(name:"Credentials", title:"Select devices...", nextPage:"", refreshInterval:refreshInterval, install:true, uninstall: true) {
|
||||||
section("Select your location") {
|
section("Select your location") {
|
||||||
@@ -372,9 +373,9 @@ def updateDevices() {
|
|||||||
data["color"] = colorUtil.hslToHex((device.color.hue / 3.6) as int, (device.color.saturation * 100) as int)
|
data["color"] = colorUtil.hslToHex((device.color.hue / 3.6) as int, (device.color.saturation * 100) as int)
|
||||||
data["hue"] = device.color.hue / 3.6
|
data["hue"] = device.color.hue / 3.6
|
||||||
data["saturation"] = device.color.saturation * 100
|
data["saturation"] = device.color.saturation * 100
|
||||||
childDevice = addChildDevice("lifx", "LIFX Color Bulb", device.id, null, data)
|
childDevice = addChildDevice("smartthings", "LIFX Color Bulb", device.id, null, data)
|
||||||
} else {
|
} else {
|
||||||
childDevice = addChildDevice("lifx", "LIFX White Bulb", device.id, null, data)
|
childDevice = addChildDevice("smartthings", "LIFX White Bulb", device.id, null, data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user