I'm looking for some ideas on how to best control the bathroom fan along with the light switch.
I have 4 bathrooms with fans, I would like the fan to come on if the light has been on for 3 minutes and to turn off 3 minutes after the light has been turned off. Of course the fan can be manually controlled too. My first pass at this rule is:
Is it possible to create a rule that takes a light's button press and links it with a corresponding fan and applies the 3 minute rule to that combo? To have a generic button press handler that says "oh, you're a bathroom light, if in 3 minutes your buddy fan isn't on, I'll turn him on". I would of course then need to define which the "buddy fan" was.
Or do I just need to make 4 separate rules?
Any suggestions on better ways of doing this than what I've done here?
I don't think you can make one rule that would work for all 4 locations. You do need to use separate rules.
As an aside, you could use a simpler version of your rule using "stays that way" and "wait for event" statements which may make copying the rule a bit easier
But no way to use a button press as a variable? So if button X then switch Y? I'm not opposed to making the same rule 3 more times, especially since you can copy and paste them, but it would be really cool if a button press trigged the timer and noted which button was pressed so when the timer went off the rule could figure out which fan to check.
Or I guess I could just have the rule work for every bathroom switch and fan, though that could turn on the fan if someone went to a different bathroom after the timer was started.
I deleted my original response since it didn't really answer your question (looks like you were responding as I deleted it though).
In any case, I don't think there is a easy way for what you are trying to do (at least not easier than copying the rule 4 times) -- or I should say Cloning the rule as Cloning works well for these kind of cases.
For some operations where any of a group of devices can trigger, you can then operate on the state of the dimmer that triggered rule (e.g., using "Track event dimmer"), but I don't think there is an easy way to select among different target devices based on the triggering device. Maybe there is some kind of complex "If" "else" statement you could come up with - doesn't seem the effort for this simple example.
Welcome! The "stays that way" feature is new to the triggers, as is "wait for event" in the Actions section - these really helps make a lot of problems much simpler.