예제 #1
0
파일: Extensions.cs 프로젝트: netonjm/Rosie
 public static DeviceUpdate ToDeviceUpdate(this SmartThingsUpdate update)
 {
     return(new DeviceUpdate
     {
         DeviceId = update.Event.DeviceId,
     });
 }
예제 #2
0
파일: Extensions.cs 프로젝트: netonjm/Rosie
        static string StatusKey(this SmartThingsUpdate command)
        {
            var commandName = command?.Event?.Name;

            return(CommandNames.TryGetValue(commandName, out var name) ? name : commandName);
        }
예제 #3
0
파일: Extensions.cs 프로젝트: netonjm/Rosie
 public static bool ShouldIgnoreUpdate(this SmartThingsUpdate update) => !string.Equals(update?.Event?.EventSource, "DEVICE", StringComparison.OrdinalIgnoreCase);