Expose impulseType from Ring Virtual Lock in Unofficial Ring Connect

When my lock is toggled by hand, the state is updated with impulseType : locked.by-manual

State Variables
signalStrength : [{rssi=-85.0, zid=0dab03dd-bc48-4d7c-9beb-a8dfb6a0e4de, nodeId=1, quality=ok, status=valid}]
lastUpdate : 1706541538506
lastCommTime : 1706541538292
impulseType : locked.by-manual

In Rule-Machine, I have it set up to lock my locks automatically after n time. But it will still run even though the lock has been locked manually. The lock and unlock state comes from the Ring integration and now the z-wave lock itself. It appears that ring detects the manual unlock differently than a digital unlock. It seems to register with the impulseType. How can I get the Rule Machine to consider the value of this impulseType and only attempt the rule if it is an expected value.

Note the rule looks at the contact sensor and checks to see if the sensor is closed so we don't accidentally close the door with the bolt extended due to the lock engaging from HE

I may have found a way to expose the attributes in the driver by adding the following to the driver code for the ring virtual lock

    attribute "impulseType", "enum", ["locked.by-manual", "unlocked.by-manual", "unlocked.by-keypad.access-code", "command.complete"]

In Rule Machine you can select any attribute using "Custom Attribute" when choosing your conditions. Any attribute that shows up on the device driver page can be accessed that way.

yeah when I wrote the post, initially, that attribute impulseType wasn't showing up.
Screen Shot 2024-01-30 at 3.02.49 PM

I had to make an enum list of impulseType that contained the different impulse states and then save the value of the enum to the deviceInfo map for it to appear and get Rule Engine to evaluate it.
Screen Shot 2024-01-30 at 3.04.35 PM

So far it works well!

code follows:

    attribute "impulseType", "enum", ["locked.by-manual", "locked.by-one-touch", "unlocked.by-manual", "unlocked.by-keypad.access-code", "command.complete"]