private string GetInputName(IPremiseObject input) { string inputName = input.GetValueAsync <string>("AlexaInputName").GetAwaiter().GetResult(); if (string.IsNullOrEmpty(inputName)) { // if the AlexaInputName isn't set then use the object name. inputName = input.GetNameAsync().GetAwaiter().GetResult(); } return(inputName.ToUpper()); }