Rule Machine trigger "stay" for variable time value

Hi -

It would be great if the Rule Machine trigger "stay" time could be set to a global or local variable number.

e.g., A Rule Machine trigger could be setup to wait for a certain amount of precipitation time (a number of minutes that is better managed through a variable vs hard-coding in a rule) before running actions and then wait for a similar (or different amount) of set variable time for it to stop to reset the rule for the next run.

The use-case is that I would like Hubitat to send a message that precipitation has started and/or stopped after a specified amount of time.

See the attached pic for the rule.

OR - If anyone has a better way to implement the functionality, I'm all ears!

Thanks!

Peter

I'd consider a rule like:

Required expression:
Tempest reports Precip <= 0.0

Trigger events:
Tempest reports Precip > 0.0

Actions to Run:
Wait for event: --> elapsed time: variable
// Whatever is next

This will depend on exactly how your device reports (which I don't know, but seems likely based on what you originally suggested) and what you actually want to do (which I don't know, so this is a general pattern you may need to adapt to your specific situation). The key is that "Wait for event: elapsed time" lets you use a variable time, and coupled with a required expression that ensures your rule will trigger only once at this exact threshold crossing, it should effectively get you where you need to be.