public static DeviceUpdate ToDeviceUpdate(this SmartThingsUpdate update) { return(new DeviceUpdate { DeviceId = update.Event.DeviceId, }); }
static string StatusKey(this SmartThingsUpdate command) { var commandName = command?.Event?.Name; return(CommandNames.TryGetValue(commandName, out var name) ? name : commandName); }
public static bool ShouldIgnoreUpdate(this SmartThingsUpdate update) => !string.Equals(update?.Event?.EventSource, "DEVICE", StringComparison.OrdinalIgnoreCase);