Example #1
0
 public static DeviceUpdate ToDeviceUpdate(this SmartThingsUpdate update)
 {
     return(new DeviceUpdate
     {
         DeviceId = update.Event.DeviceId,
     });
 }
Example #2
0
        static string StatusKey(this SmartThingsUpdate command)
        {
            var commandName = command?.Event?.Name;

            return(CommandNames.TryGetValue(commandName, out var name) ? name : commandName);
        }
Example #3
0
 public static bool ShouldIgnoreUpdate(this SmartThingsUpdate update) => !string.Equals(update?.Event?.EventSource, "DEVICE", StringComparison.OrdinalIgnoreCase);