I'm using HE 2.3.0.120 (hardware version: Rev C-5)
With the holiday season coming in, I'm planning to create a random light switching on/off to simulate someone at home. I tried to do this using RM using repeat with expression.
Plan:
Create a rule that will be triggered when global variable Holiday_Mode == True
To run only between sunset and sunrise
Randomise lights on and off
Issue:
Unable to add actions (to randomise lights on/off) with repeat with expression
• What happens after you click "Done with While Expression"?
• How do you intend to "randomize" the lights?
In part, I'm just curious because I happened to submit a Feature Request last week for a "Toggle Random Devices" function in RM but have not heard whether it will be considered. My intended work-around (I've since abandoned developing my 'xmas lights' rule...) would be to generate random numeric values stored in local variables, and then through a series of IF-THEN clauses, turn each light ON or OFF based on a 0 or 1 value.
While (no pun intended) attempting to check out your situation using a new rule, I noticed that things can quickly become "broken" -- to the point I was no longer able to edit my rule after these steps:
• I added a Comment (is that a new feature? or has it always been there?!)
• I started a WHILE EXPRESSION REPEAT block (from "Sunset" to "Sunrise", repeating 1 time, with an interval of 30 seconds), then clicked "Done with While Expression"
• Added a Switch ► Dining Room Light ► On action
• Clicked END-REP to finish the block
• Then, just for fun, I clicked EDIT ► WHILE EXPRESSION, and deleted the "30" under "Seconds" and the "1" under "Repeat n Times"
Note how this maneuver caused a BROKEN ACTION warning and the disappearance of the "Done with Action" button? (i.e. you cannot escape now)
Furthermore, when I attempted to re-enter the "30" and the "1", things did not improve; in fact, I'm now kinda permanently stuck on that screen, and unable to click the mouse cursor into either of those fields to edit them. Weird!
Just FYI here is a rule I have that simulates someone going to our downstairs bathroom when we are away.
Hall light comes on then downstairs wc.
WC turns off then the hall light.
It repeats at random intervals every hour.
You may find it useful.
While possibly not related to your problem, it appears you have screen reader support turned on. If you're not using one, I'd go to "Settings" and turn this off--it's the "Enable screen reading accessibility" at the top and is meant for software like JAWS. If this is intentional, then I assume this would work if you used the software to make the selections (if not, there could be a problem--but this setting isn't meant for point-and-click users like the default setting is, and it has caused odd issues for such users in the past).