Lock with LockCode

In Webcore, I had a piston that would turn on the entry light when the door was unlocked, but only if it was unlocked with a code, meaning coming INTO the house rather than leaving… Is this possibleto accomplish this with a RULE? I don’t see it’s possible with the app automations as lock code is not exposed, but maybe with the RULEs API, or maybe an changed by attribute to tell if it was locked/unlocked manually (inside going out), code or zwave function (unlocked by an automation or rule or scene) in addition to which code or name associated to that code as defined in the smart lock guest access


I am looking for a solution similar as your use case. I put a test json to see if I can match lockCodes to identify a specific person but it seems not working.

@nayelyz, how are requests for changes processed? How does one know if their suggestion is accepted and put into the backlog?

I would propose to add

Which would provide the code ( i.e. 1,2…)

Additionally, a way to determine how the lock was locked/unlocked (i.e. code, manual, hub command)

*If a Rule unlocked the lock, then ‘command’.
*if user pushed the lock button (outside) or knob(inside) then ‘manual’
*else ‘code’

If code, then the lockCode would contain the index of the locks code.

All this info was available from WebCore and certainly the SmartLock has the info…

Pretty please? :pleading_face: