I have a leak sensor that when triggered (wet), I want to send a notification and also flash a light for 5 minutes. I've got the notification part working fine, but can't figure out how to do the light flash part.
In RM, I select the leak sensor "WET" as the trigger, and in "Actions to Run" I select "Control Switches and Buttons" then select "Flash switches". But I see nowhere I can limit the flashes to 5 minutes. Is this possible, or am I doing something wrong?
While it may depend on device-specific behavior if the device has a "native" flash capability (which pretty much always works better than ones simulated by a driver, but I digress), normally, the flash will continue indefinitely until stopped. An On, Off, or Set Level command will stop it--so calling one of those, as suggested above, would work, or you could use the "Capture and Restore" feature in Rule Machine (or a variable plus manual work to get the same outcome, if you really want) to put it back to what it was before instead of always on/off, if that is your goal
This is what that suggestion will do. These would be three actions in the rule. The delay waits for the specified amount of time to pass, then continues with the next action. So, you'd first get the flash started, then the delay, then turn it off (and stop the flash). You could consider "Wait for events: elapsed time" instead if you want to start this "delay"/wait over on re-trigger--I often recommend this action instead nowadays--but that depends on how you're triggering the rule and what you want to happen.
Thanks guys, it's working using three actions (1) start flash (2) stop flash after Delay (3) turn off switch.
The device I'm flashing does have native flash support. Will Hubitat choose to use the native flash or the simulated flash automatically in Action 1 above?
What device are you using? You can't tell from the driver alone if there is native suport. Rule Machine will use the "Flash" command in the driver, and it's up to the driver how (or if) to implement that.