mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-03-16 05:10:50 +00:00
Compare commits
1 Commits
netatmo-ap
...
MSA-1531-1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4511c7dcd8 |
@@ -387,18 +387,18 @@ def getDeviceList() {
|
|||||||
state.deviceDetail = [:]
|
state.deviceDetail = [:]
|
||||||
state.deviceState = [:]
|
state.deviceState = [:]
|
||||||
|
|
||||||
apiGet("/api/getstationsdata") { response ->
|
apiGet("/api/devicelist") { response ->
|
||||||
response.data.body.devices.each { value ->
|
response.data.body.devices.each { value ->
|
||||||
def key = value._id
|
def key = value._id
|
||||||
deviceList[key] = "${value.station_name}: ${value.module_name}"
|
deviceList[key] = "${value.station_name}: ${value.module_name}"
|
||||||
state.deviceDetail[key] = value
|
state.deviceDetail[key] = value
|
||||||
state.deviceState[key] = value.dashboard_data
|
state.deviceState[key] = value.dashboard_data
|
||||||
value.modules.each { value2 ->
|
}
|
||||||
def key2 = value2._id
|
response.data.body.modules.each { value ->
|
||||||
deviceList[key2] = "${value.station_name}: ${value2.module_name}"
|
def key = value._id
|
||||||
state.deviceDetail[key2] = value2
|
deviceList[key] = "${state.deviceDetail[value.main_device].station_name}: ${value.module_name}"
|
||||||
state.deviceState[key2] = value2.dashboard_data
|
state.deviceDetail[key] = value
|
||||||
}
|
state.deviceState[key] = value.dashboard_data
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1765,4 +1765,4 @@ def hsvToHex(hue, sat, value = 100){
|
|||||||
def b1 = String.format("%02X", (int) (b * 255.0f))
|
def b1 = String.format("%02X", (int) (b * 255.0f))
|
||||||
|
|
||||||
return "#$r1$g1$b1"
|
return "#$r1$g1$b1"
|
||||||
}
|
}
|
||||||
@@ -682,4 +682,4 @@ private Boolean hasAllHubsOver(String desiredFirmware) {
|
|||||||
|
|
||||||
private List getRealHubFirmwareVersions() {
|
private List getRealHubFirmwareVersions() {
|
||||||
return location.hubs*.firmwareVersionString.findAll { it }
|
return location.hubs*.firmwareVersionString.findAll { it }
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user