Fun with Rules!

Rule Machine is so generalized that it can be used to do all sorts of things. This topic is for examples of cool Rules. Show us the novel ideas you have come up with for things to do with Rule Machine!

To start off, here is a fun rule: I bought as OSRAM flex color strip so that I could test the code in Rule for setting colors. Now that Rule and Trigger have that capability, I use it all the time to show Rule and Trigger outcomes on my desk, where I have the flex strip plugged in. I thought that putting the light into a loop would be cool, so check this out:

“Loop Switch” is a virtual switch I created in the IDE, an On/Off Button Tile.

This rule could easily be modified to run anything on a repeating time schedule, e.g., once an hour, once every 20 minutes, etc. This particular rule uses the True outcome to turn the lights to green, and the False outcome to make them red. It uses equal time periods for red and green. All of that could be changed. If you use a Momentary Button Tile for a switch-on condition, and only use a True action, you can have some action happen on a repetitive schedule. In that case, the Action for true would schedule a delayed on for the momentary button, for the next cycle, as well as taking whatever action it is you want it to take.


Not as clever as Bruce’s solution, but I kinda like it. This single rule takes care of ceiling fan requirements in both heating and cooling seasons (it’s a reversible fan). I also have a restriction to only evaluate when in Home or Away modes… not that there’s any real value in doing so, but it prevents the possibility of the bedroom ceiling fan coming on if I come home in the middle of the night (it’s been known to happen :smile: ).

1 Like

Maybe incorporate the Flasher II app to blink green a few times then red, pink , blue, etc.

I use Rules to adjust the kitchens light brightness according to the Lux level & motion reading off the multi-sensor with mode restrictions. 4 levels. Thinking of adding in Gentle Wake Up somehow for a more gradual adjustment instead of noticeable 20% drops/increases.

Maintaining X Lux level in a room from a variable input by lowering/raising dimmers automatically would be ideal.


Have a look at autoDimmer, it may suite your needs.

1 Like

This thread title reminds me of Fun With Flags! :wink: