All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.digitaldan.harmony.shell.ListDevicesCommand Maven / Gradle / Ivy

There is a newer version: 1.1.7
Show newest version
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());
            }
        });
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy