Some posts which might help:… There are lots of approaches but most of them will require inline scripts.
- Basic Profiles - Transformation Services | openHAB (debounce between the channel and the item)
- Design Pattern: Motion Sensor Timer
- Generic Presence Detection
- Design Pattern: Debounce (examples in code)
- Debounce [4.0.0.0;4.9.9.9] (rule template you can install and use the create the rule(s) to do this, which is what I use to debounce my presence Items)
This part is confusing.
A rule has three parts.
- triggers: events that cause the rule to run
- conditions (but only if…): what states all have to be true to run the script actions for a given trigger
- actions: the stuff to run when triggered and the conditions are true
The rule reaches the “but only if” first. Where’s the delay coming from?
Indeed, the information about the event that caused the rule to trigger is saved at the time the some was triggered. But it’s not clear what you are testing here, the values in the event or the states of Items. And the timing doesn’t make sense either because the conditions will run right away. I know if no way to delay that. If you’ve added added a delay to the actions, that delay occurs after the conditions have already run.
I don’t think so. These define the states that must be true at the time the rule is triggered in order to run the actions.