updateLightOptions method
Update a light configuration. Note: wait a few milliseconds between each request, as the call may be ignored otherwise
Implementation
Future<bool> updateLightOptions(KeyLightOptions newOptions) {
return http
.put(
Uri.parse(formatUrl('lights')),
body: jsonEncode(newOptions.toJSON()),
)
.then((response) {
return response.statusCode == 200;
});
}