public override Task ExecuteAsync(string[] arguments) { var thingName = arguments.FirstOrDefault(); if (string.IsNullOrWhiteSpace(thingName)) { Output.WriteLine("No thing name specified"); return(Task.CompletedTask); } var thing = _thingRepository.FirstOrDefault(x => x.Name == thingName); if (thing == null) { Output.WriteLine($"Thing '{thingName}' not found"); return(Task.CompletedTask); } Output.WriteLine($"Name: {thing.Name}"); Output.WriteLine($"Id: {thing.Id}"); Output.WriteLine($"State: {thing.State}"); Output.WriteLine(); PrintChannels(thing.Channels); return(Task.CompletedTask); }