Newbie question: How do I add Else-If, End-If, etc

It doesn't add much complication--a rule that uses a "changed" trigger and an IF/ELSE in the body to act differently according to the sensor state is a quite common paradigm for a Rule 4.0 rule. You can see many examples in the documentation: [Released] Rule 4.0. I'd highly recommend reading this before you go too far. There's an example with motion lighting that is almost exactly like what you want (except you appear to want to just dim the light to 1% instead of turning it off, unless you didn't mean to do that).

I'd second the advice to try Motion Lighting if you haven't already given it a chance--maybe let the event-driven nature of Hubitat and the various commands and attributes exposed by its device model sink in a bit before diving into the deep end creating rules? Then you'll be more familiar with how they work and able to write rules more easily. The built-in apps are numerous and powerful, and I'd consider Rule Machine (itself a built-in app) a powerful tool available to help you create custom logic that is not possible using one of them.

2 Likes