Rule could be rewritten in a more efficient way?

I was curious if there were better ways to see the if/then trees when you are running a few deep. In this rule I have an RGB bulb in the hallway show pink if one of my 2 garage doors are open. This trumps all other issues: door unlocked, daytime. If the front door is unlocked then the bulb will be a yellow tint. If the the garage doors are both closed, front door is locked and the time is between 7pm and 1:30am the lamp will be on with a regular hue/color.

I also have 2 inovelli dimmer switches with LED notifications copying the bulb. And will be blue if all are locked/closed.

The rule works great and mimics my webcore piston that I used variables. So I am very happy. It looks clunky and cannot fully edit the if/then tree on the right. I am open to suggestions for future rule developments.

I did get a suggestion to create a ā€œnotificationā€ routine in ST that is triggered on instead of placing 4 actions for each switch LEDā€™s notification.

Hey Iā€™m not sure if this will help but a new stacking feature was just made available to help with the visual layout of complex rules.

Thereā€™s several features that could help simplify the creation and maintenance of this rule. In no particular orderā€¦

  1. Use Multi Device Triggers to select all of the devices with the same type of trigger
    • For example, you could combine your Home Door Sensor and Far Door Sensor together
  2. Use the new generic ā€˜updateā€™ or ā€˜changeā€™ trigger
    • So you donā€™t have to create separate open & closed or locked & unlocked triggers
  3. Use a Scene or SharpTools Rule for ā€˜groupsā€™ of actions
    • You can call a SmartThings Scene directly
    • For a rule, you would need some way to trigger it. For example, you could create a true/false variable to go along with your separate rule. Then control the variable from your main rule and your secondary rule would react to that and update the Inovelli indicators as needed.
  4. Check if the Inovelli devices have a method to create a notification in one command

For item 4, I couldnā€™t find the source code for the Inovelli SmartThings drivers, but I wonder if they have any convenience methods where you could create the ā€˜LED notificationā€™ with a single command.

I would be surprised if they donā€™t have some sort of setNotification() type of command that let you pass in all the features you wanted to set all at once. You might ask in their community - feel free to tag me using @josh over there as well if you need me. :slight_smile:

1 Like