Window Shades in Rule Machine

Please add better support for shades to rule machine:

  • Conditional action - IF shade is open/closed/opening/closing...
  • Action - "Activate Scenes, Adjust Shades or Fans" - add "Stop shade position change"
  • When adding new condition and selecting device capability, add "window shade" to be able to filter those devices

This would then allow to create rule for button press to do:
if shade is opening/closing -> stop
if shade is open -> close
if shade is closed -> open

It is almost possible to create this using custom actions, except I have to use button double pres to trigger Stop, because there is no condition for shade opening/closing.

1 Like

You can do this using a custom attribute condition. The windowShade attribute should have the values for which you seek.

3 Likes

Awesome, thank you, I can now do exactly what I want this way. Although it would still be great if it's supported by RM directly, not by custom actions/attributes. It looks like shades are not consistent in RM - you can select action to open/close, but not to stop. And if you select "open shade", as soon as you select it, it changes from dropdown item "open shade" to label "raise shade". Same with dropdown "close shade" which changes to label "lower shade". Dropdown naming open/close is alright, as shades can be vertical or horizontal, so I don't know why it then changes to lower/raise.
I really appreciate what you suggested as with this I can do even more I wanted, not just shades. Implementing these simple changes would just make it more user friendly.

I will look into adding your suggestions.

1 Like

These features will be in Release 2.2.9, for both Window Shades and Window Blinds.

3 Likes

Awesome news, thank you @bravenel . In the meantime, I wrote the rule with what's currently available and found out 2 more possible improvements. The rule currently looks like this:


"obývák závěs" means "living room curtain".

1/ "if" on states - When there is choice from enum, it would be great if it shows checkboxes instead of radiobuttons. The same way it works when you select "mode" condition. Then, instead of creating 2 (or more) conditions with OR, and selecting the same device multiple times, the condition would be "obývák závěs windowShade in (opening, closing)"

2/ "else if" - You see the green "if" is indented. Luckily, the driver I use for curtain supports also "switch" capability, so in the last else I can use simple "toggle". Without this capability, I'd have to use another nested if/else for open/close. Would it be possible to add "else if" command to conditionals? Complicated conditions would then be more readable, as everything would have the same indent, no nested ifs.

Thank you

There is an ELSE-IF available. It will only be presented as a choice when you have an open IF-THEN. As for multiple states in a Condition, it just doesn't work that way, and won't.

I must be missing something, as I don't see "else-if", there are buttons only for "else" and "end-if":

You will find the else-if under the “Conditional Actions” type of action:

1 Like

Download the Hubitat app