Updated build gradle
Added functions ph. hue
This commit is contained in:
@@ -26,10 +26,18 @@ public class hue {
|
||||
}
|
||||
}
|
||||
|
||||
public void looping() {
|
||||
public void setBrightness(int num) {
|
||||
for (String light : allLights.keySet()) {
|
||||
String callURL = lightsURL + light + "/state";
|
||||
String body = "{ \"on\" : true, \"effect\" : \"colorloop\" }";
|
||||
String body = "{ \"bri\" : "+num+" }";
|
||||
rest.put(callURL, body, "application/json");
|
||||
}
|
||||
}
|
||||
|
||||
public void setAttribute(String attribute, String value){
|
||||
for (String light : allLights.keySet()) {
|
||||
String callURL = lightsURL + light + "/state";
|
||||
String body = "{ \""+attribute+"\" : "+value+" }";
|
||||
rest.put(callURL, body, "application/json");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user