Time on your hands and fancy a Rule Machine challenge?

You can still use the Global Variable, but your rule is getting retriggered every time the Humidity sensor reports a value over 40. I would simplify your rule using a conditional trigger.

Required Expression:
Time between 9:00 and 17:15

Triggers:
Humidity sensors any report greater than 40 (only if Global Variable is Fan is off)

Actions:
Turn on Fan
Set Global Variable to Fan is on
Wait for Events: Humidity less than or equal to 40, Time is 18:00, or a timeout of 1 hour
Turn Off Fan
Set Global Variable to Fan is off

It's tough to say exactly where your rule bogged down, but the above should simplify it to track easier. Basically, the humidity sensors can only turn on the fan if the fan is not already on via the global variable. If you didn't use the global variable, you could change the conditional trigger to just the fan being off.

2 Likes

Thanks @JB10 ! I'll sipmlify it and test again.

There's two different rules. There's a virtual dimmer that the up/down control on the fan switch adjusts by either +5 or -5. I have a separate rule that constrains it to adjusting to no less than 5, and no greater than 20. The only thing that may look odd is that I needed to turn the LZW36 LED indicator OFF and then back ON again when it transitions to the next color, otherwise it would just remain OFF when attempting to transition from one child device being OFF, and the other turning ON. It's just a weird quirk of the LZW36 firmware that probably will never be fixed now. :person_shrugging:

1 Like

This actually solved the problem and the rule is now working. Again, many thanks, much appreciated.

1 Like

Ah, that was nifty, nice. Thank you for sharing. I haven't used the Elapst time statement yet.