New Trigger Events

Hey there,

having in-depth rules and everything since multiple years, there are some things that would really helped me a lot, if they were built into the Trigger functions. I’m talking about these:

When Item <item> <trigger>

For Example:

When Item LivingRoomLuxmeter changed to 5000

Now there is a lot of stuff that could be built into the above syntax. Without much talking, I will just list some examples what I am thinking about:

When Item Temperature changed to < 16  // evaluating ranges
When Item Temperature changed to > 16 && < 24  // evaluating ranges
When Item Luxmeter changed to > 5000 for 60 seconds  // debouncing

I think you get the Idea. Sure - all of this can be done using logic in rules and I also agree that these are not pure triggers, because the change is the trigger, but not the evaluation. But adding this kind of high-level constraints may be really useful, because they are useful in almost every rule.

I decided against this when designing the rule DSL, since it would immensely complicate the grammar of the DSL as well as its evaluation. Imho being able to do any kind of complex conditions in the then-block is an acceptable compromise.