+
+ static Console.Command sunriseMode() {
+ return command(new String[] {"sunrise"}, (console, args) -> {
+ if (args.length == 1) {
+ int durationSeconds = Integer.parseInt(args[0]);
+ console.getCakelight().setMode(new SunriseMode(durationSeconds));
+ console.out("setting sunrise mode with duration " + durationSeconds);
+ return true;
+ } else {
+ return false;
+ }
+ });
+ }