Ok, so I am looking at learning how to use RM - and I will be the first to admit my head is kinda assploding a bit - so if I am missing something obvious, dont feel bad laughing at me ...
(and I know I can look at the WebCoRE port to HE, but I would prefer to do this 'native' if I can ...)
I have a simple piston
If Front Door Motion becomes active OR Front Door Unlocks
and Mode is NIGHT
With Entrance and Porch Lights
Capture Current Switch State & Dimmer Level
Set Dimmer Level to 100%
Wait 3m or until Door Locks
Restore Previous States of Entrance and Porch Lights
For the record - if this matters Motion Detector in this case is a RING Doorbell Pro (still connected to ST and linked via HubLink (and sending data properly in the logs) Door Lock is a Schlage - again connected via HubLink and sending Locked/Unlocked properly. I did have to change the Driver to VIrtual Lock instead of Virtual Omnisensor but its showing correct actions in the logs Lights are via Lutron Caseta Pro (standard dimmers) and function correctly in HE)
I am having a hard time figuring out what type or RM to use (Rule, Trigger, Triggered Rule, Actions etc) and how to set this up in the IDE
I guess I am looking for samples to build from, an idiot's guide to RM, or some help building out this fairly simple (in my head coming from WebCore) process ... from which I can hopefully grok it and run with it
Right you are sir! You have to make a simple rule that translates the contact sensor open/close to a virtual switch on/off action, and then you can define that virtual switch under additional options in Motion Lighting.
However, you can also just as easy (read: easier) create two Hubitat Simple Lighting rules with the Simple Lighting app. One for the motion sensor and one for the contact sensor.
I think in every scenario I can think of that would work, except if you somehow were able to enter the bathroom without the motion sensor ever detecting you. Then the trigger would call on the rule and if it remained false, the light wouldn't activate. Which really begs the question, why do you need both because a properly placed motion sensor in the bathroom should always detect you.
Anyway, here's another way using a rule and motion lighting, which I believe should do what you want as well. I like motion lighting because of the extra options that are nicely presented, rather than having to work your mind into how to create the rule to do all those motion lighting and contact (switch) tasks.