Here you go.
Background: I have keyless locks. And they do not produce double events like the Schlage lock seems to. And my suspicion is that the double events will interfere with this rule working properly.
The rule below only determines if the lock was locked from the outside or the inside. If it is from the outside, the descriptionText will contain the word "button". If it is from the inside, the description text will contain the word "thumb".
You can import the JSON below the screenshot of the rule.
Exported Rule
{"deviceReplacements":{"1219":{"deviceName":"Yale Zigbee Lock","deviceLabel":"Front Door Lock","deviceTypeName":"Yale Zigbee Lock","deviceTypeNamespace":"Hubitat"}},"appReplacements":{"3131":{"appTypeName":"Rule-5.1","appTypeNamespace":"hubitat","appType":"sys","appName":"Rule-5.1","appLabel":"How was the lock locked?","parentAppInstalledAppId":"3117","parentAppTypeName":"Rule Machine","parentAppTypeNamespace":"hubitat","parentAppName":"Rule Machine","parentAppLabel":"Rule Machine","childApps":{},"singleInstance":false}},"appData":{"3131":{"state":{"parens":{"1":0,"2":0},"actionDone":true,"ndx":9,"dateFormat":"yyyy-MM-dd","nestedBlock":[],"installedRules":[],"clonedName":"How was the lock locked?","selectActionsParams":{"label":"How was the lock locked?"},"editCondIf":null,"stopOnST":false,"usesTime":false,"nestedIf":[],"inIf":null,"trigCustoms":[],"repeating":null,"setDisabledActs":true,"capabDone":true,"skipping":false,"lastEvtName":"Front Door Lock","locationBlocked":[],"pbFixed":true,"inRepIf":null,"ruleNdx":3,"notEqual":true,"actionList":["1","2","3","4","5","6"],"firstR":{"1":false,"2":false},"actLabelIndent":"","varSettingsUpdated":true,"certainTimes":[],"disabledActions":[],"prevState":{"PB":"true","description":"Front Door Lock was locked via command [digital]"},"blockIf":false,"eval":{"1":[3],"2":["6"]},"lastEvtText":"Front Door Lock was locked via command [digital]","capabstrue":{"1":"Front Door Lock locked"},"nestedSkipAll":[],"skipType":"if","lastEvtDate":"2023-01-05","nestedInIf":[],"actions":{"1":{"wait":null,"delay":"","modes":{},"method":"getSetVariable","indent":"","rule":null,"cond":0},"2":{"wait":null,"delay":"","modes":{},"method":"getIfThen","indent":"","rule":1,"cond":0},"3":{"wait":null,"delay":"","modes":{},"method":"getLogMsg","indent":"\\t","rule":null,"cond":0},"4":{"wait":null,"delay":"","modes":{},"method":"getElseIf","indent":"\\t","rule":2,"cond":0},"5":{"wait":null,"delay":"","modes":{},"method":"getLogMsg","indent":"\\t","rule":null,"cond":0},"6":{"wait":null,"delay":"","modes":{},"method":"getEndIf","indent":"\\t","rule":null,"label":"END-IF","cond":null}},"usesDate":false,"actNdx":7,"lastEvtValue":0,"installed":true,"waitEvents":[],"private":"true","isPredicate":false,"copyL":[],"lv_description":{"name":"description","attribute":null,"type":"string","value":"Front Door Lock was locked via command [digital]","deviceId":null},"simpleCond":false,"changedValues":true,"nestedRepIf":[],"lastEvtTime":"14:03","condOper":"cond","nestedElse":[null],"formerState":"description","varTriggersFixed":true,"setCopyActs":true,"skipAll":null,"needWaitCancel":false,"cutAction":[],"broken":false,"stopped":false,"rulesList":[],"nestedLabel":[],"oldInputAct":true,"inputAct":true,"stateVarsUpdated":true,"lastEvtDevId":"1219","waitCondNdx":1,"token":1,"capabsfalse":{"3":"Variable description<span style='color:black'>(String variable)</span> *contains* 'button'","6":"Variable description<span style='color:black'>(String variable)</span> *contains* 'thumb'"},"stPrimed":true,"allLocalVars":{"description":{"attribute":null,"type":"string","value":"String variable","deviceId":null}},"varSettingsOld":{},"timeFormat":"HH:mm","doActN":"N","olddValues":true,"needWaitDone":false},"appSettings":[{"deviceList":null,"multiple":false,"name":"tCapab1","type":"enum","value":"Lock"},{"deviceList":null,"multiple":false,"name":"cut1","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"isVar_6","type":"bool","value":""},{"deviceList":null,"multiple":false,"name":"actionDone","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"isVar_3","type":"bool","value":""},{"deviceList":null,"multiple":false,"name":"tCapab3","type":"enum","value":""},{"deviceList":null,"multiple":false,"name":"chkBox1","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"I1","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"chkBox2","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"I2","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"butEndIf","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"logmsg.3","type":"textarea","value":"%device% was %value% from the outside"},{"deviceList":null,"multiple":false,"name":"tCapab7","type":"enum","value":""},{"deviceList":null,"multiple":false,"name":"chkBox3","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"I3","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"useST","type":"bool","value":""},{"deviceList":null,"multiple":false,"name":"varType","type":"enum","value":""},{"deviceList":null,"multiple":false,"name":"xVarV.1","type":"enum","value":"description"},{"deviceList":null,"multiple":false,"name":"actSubType.1","type":"enum","value":"getSetVariable"},{"deviceList":null,"multiple":false,"name":"tstate1","type":"enum","value":"locked"},{"deviceList":null,"multiple":false,"name":"actSubType.2","type":"enum","value":"getIfThen"},{"deviceList":null,"multiple":false,"name":"actSubType.3","type":"enum","value":"getLogMsg"},{"deviceList":null,"multiple":false,"name":"actSubType.4","type":"enum","value":"getElseIf"},{"deviceList":null,"multiple":false,"name":"butElse","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"editPV","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"cut2","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"dValues","type":"bool","value":"true"},{"deviceList":null,"multiple":false,"name":"cut3","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"valString.1","type":"textarea","value":"%text%"},{"deviceList":null,"multiple":false,"name":"hasAll","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"cancelCapab","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"actType.1","type":"enum","value":"modeActs"},{"deviceList":null,"multiple":false,"name":"editToken","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"3.0.false","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"RelrDev_3","type":"enum","value":"*contains*"},{"deviceList":null,"multiple":false,"name":"xVar_6","type":"enum","value":"description"},{"deviceList":null,"multiple":false,"name":"hbVar","type":"text","value":""},{"deviceList":null,"multiple":false,"name":"valStringOp.1","type":"enum","value":"Set string"},{"deviceList":null,"multiple":false,"name":"RelrDev_6","type":"enum","value":"*contains*"},{"deviceList":null,"multiple":false,"name":"1.0.false","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"xVar_3","type":"enum","value":"description"},{"deviceList":null,"multiple":false,"name":"lvTable","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"1","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"2","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"origLabel","type":"text","value":"How was the lock locked?"},{"deviceList":null,"multiple":false,"name":"3","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"eraseRule","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"actType.3","type":"enum","value":"messageActs"},{"deviceList":null,"multiple":true,"name":"logging","type":"enum","value":null},{"deviceList":null,"multiple":false,"name":"actType.2","type":"enum","value":"condActs"},{"deviceList":null,"multiple":false,"name":"editCond","type":"enum","value":""},{"deviceList":null,"multiple":false,"name":"delayAct.1","type":"enum","value":"none"},{"deviceList":null,"multiple":false,"name":"actType.4","type":"enum","value":"condActs"},{"deviceList":null,"multiple":false,"name":"delayAct.3","type":"enum","value":"none"},{"deviceList":null,"multiple":false,"name":"updateRule","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"hasRule","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"cancelGV","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"disableL","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"2.0.true","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"description","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"delete","type":"enum","value":""},{"deviceList":null,"multiple":false,"name":"N","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"copyL","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"trashAll","type":"button","value":""},{"deviceList":{"1219":"Front Door Lock"},"multiple":true,"name":"tDev1","type":"capability.lock","value":null},{"deviceList":null,"multiple":false,"name":"actionCancel","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"pointless","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"comments","type":"textarea","value":""},{"deviceList":null,"multiple":false,"name":"state_6","type":"text","value":"thumb"},{"deviceList":null,"multiple":false,"name":"cancelBtn","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"disable2","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"disable3","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"state_3","type":"text","value":"button"},{"deviceList":null,"multiple":false,"name":"disable1","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"rCapab_3","type":"enum","value":"Variable"},{"deviceList":null,"multiple":false,"name":"not6","type":"bool","value":""},{"deviceList":null,"multiple":false,"name":"not3","type":"bool","value":""},{"deviceList":null,"multiple":false,"name":"moreVar","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"cutX","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"stays1","type":"bool","value":""},{"deviceList":null,"multiple":false,"name":"rCapab_7","type":"enum","value":""},{"deviceList":null,"multiple":false,"name":"rCapab_6","type":"enum","value":"Variable"},{"deviceList":null,"multiple":false,"name":"chkBox4","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"I4","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"cut4","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"disable4","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"4","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"4.0.false","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"actType.5","type":"enum","value":"messageActs"},{"deviceList":null,"multiple":false,"name":"actSubType.5","type":"enum","value":"getLogMsg"},{"deviceList":null,"multiple":false,"name":"logmsg.5","type":"textarea","value":"%device% was %value% from the inside"},{"deviceList":null,"multiple":false,"name":"delayAct.5","type":"enum","value":"none"},{"deviceList":null,"multiple":false,"name":"actSubType.6","type":"enum","value":"getEndIf"},{"deviceList":null,"multiple":false,"name":"I5","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"chkBox5","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"cut5","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"disable5","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"5","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"5.0.false","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"I6","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"chkBox6","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"cut6","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"disable6","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"6","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"6.0.false","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"runAction","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"pausRule","type":"button","value":""},{"deviceList":null,"multiple":false,"name":"stopRule","type":"button","value":""}],"subscriptions":[{"handler":"allHandlerX","name":"lock.locked","type":"DEVICE","typeId":1219,"typeName":"Front Door Lock","filter":"true"}]}}}
