This object is in archive! 

Calling or triggering one rule from another one, like a function

Benny Blomkål shared this idea 9 years ago
Under Consideration

I would like to be able to declare a "rule", or rather a function, and be able to call if from other rules. Here's an example:


Let's say I create a nice fading effect where three dimmable sockets go from 100 to 0 within a certain amount of time. Or maybe a silent alarm effect; four selected lamps around the house blink ten times within 50 seconds.


I would then like to be able to trigger such an effect/event/rule/function, from any other rule.

Perhaps I'd like to do that lamp blinking thing if the dishwasher would leak OR if smoke was detected OR if the temperature in my fridge is above a certain level.


I'd hate to rewrite all the blinking-code for each event, so some sort of partial rule would be very useful.


I guess it could be as simple as a building block where you could basically say "Trigger(NAME_OF_RULE)".


Maybe, as usual, this can be achieved in some way that I haven't figured out, and if so I'll appreciate any hints! :-)


Thanks & Best Regards

Leave a Comment
 
Attach a file