com.digitaldan.harmony.shell.ListDevicesCommand Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of harmony-client Show documentation
Show all versions of harmony-client Show documentation
Logitech Harmony WebSocket Client
package com.digitaldan.harmony.shell;
import java.util.Map.Entry;
import com.digitaldan.harmony.HarmonyClient;
public class ListDevicesCommand extends ShellCommand {
@Override
public void execute(HarmonyClient harmonyClient) {
harmonyClient.getConfig().thenAccept(config -> {
for (Entry e : config.getDeviceLabels().entrySet()) {
println("%d: %s", e.getKey(), e.getValue());
}
});
}
}