triggers-microservice is what really puts the smarts in smart home. It's basically a rule engine kind of thing, but instead of point and click and some (potentially) limited language for defining rules, you have all the power and flexibility of the JavaScript language.
I have a rule that watches the hot tub state. When it goes in, the rule watches the temperature and when it hits 90, it announces the spa has reached 90 degrees. It's desert where I live, and the spa hits 90 on its own (from the heat/sun) in the summer, so a simple "when temp is 90, announce" kind of rule is insufficient.
I have another rule that watches a motion sensor in the master bathroom. When motion is detected, it sets the dimmer to 99% during the daytime, but 5% overnight. This rule is fairly simple, and there's likely a way to do it with Hubitat proper. Although if the motion sensor is on the Samsung hub and the dimmer on the Hubitat one, then my rule works.
For the fart fans in the bathrooms, you don't have to manually turn them off. They turn off after 15 minutes (you can change the timeout). But they don't turn off if you have a light on, so you can force the fan to run while you're doing something like painting or cleaning.
Similarly, the dimmers in the bathrooms turn off after 15 minutes, but not if you have another light on.
The RGB lighting under the cabinets in the kitchen require the RGB values to be set when turned on. There's a button rule that does this. When cabinet switch turned on, send the MQTT to set the RGB values.
Outdoor lighting is turned on at sunset and off at sunrise. There used to be a timer out there, but because the sun rises and sets at different times every day, you would have to adjust the timer every so often. Using sunset/sunrise is perfect every day.
If the garage door is up/open for 15 minutes, there's a rule that sends me emails, text messages, announces out load, etc., that the door is open (every so often). If I forget to close it for some reason, I get to know it's open.
There are triggers to announce certain events, like when a lock is unlocked or locked, or at sunrise/sunset, garage door open/closed, person arrives, etc.
There are triggers to deal with virtual devices. For example, I created virtual switches in the Hubitat UI for the TV in my office, the spa, the waterfall for the pool, the jets for the spa, and so on. When the spa is on, the trigger sets the virtual switch on. When the spa is off, the virtual switch is set to off. If you manipulate the virtual switch via the Hubitat UI (or RoboDomo UI), the spa goes on or off. If you use the pool control WWW site (it's a local http server) or the on wall pad, the switch gets set proper.
The real reason I did the virtual devices is that it's a clever and free way to add things for Alexa, Google Home, and Siri (via Homebridge) to control. I can do things like, "hey Siri, turn on the spa" or "hey Siri, turn on the Office TV".
The rule for the Office TV isn't all that simple. It deals with the Denon AVR, the AVR and TV inputs, the AVR and TV power status. Turning on the TV really means, turn on the TV, turn on the AVR, set TV input to HDMI1, set AVR input to TV Audio, etc.
There is no limit to what you can do in JavaScript as far as rules go. You can get all the events going on via MQTT that you care about, and you can send MQTT messages to control things.
My current project involves arrival detection. I want to reliably open the garage door when one of the two cars arrives, and open the golf cart door when the golf cart arrives. And to lock the locks in the home when nobody is home.
Other rules are kind of obvious. Like disable A/C if a window or door is open (or refuse to turn it on). Hubitat might control and monitor the door and window sensors, but the A/C is not controlled at all by Hubitat (it has no clue about it).