I need some help figuring out something that I thought would be pretty straightforward. I am a smartthings user and I am trying to do the following:
(condition 1) one master switch (i.e. “Office Lights”) that would turn ON or OFF my 2 individual office lights
(condition 2) If any of the 2 office lights are turned ON via another tile or automation, the master switch should now be ON
(condition 3) If the 2 office lights are turned OFF, the master switch should be OFF
What I have tried so far:
I installed and used trendsetter but the master switch won’t be set to ON unless all lights in that group are ON. That’s breaking my 2nd condition.
I installed a virtual switch and set up the Smart Lighting SmartApp to “mirror behavior” but only condition 1 is met. If I turn on the 2 lights individually, the master switch remains off.
I also tried to add a bunch of automation within the smartthings app but I ended up with an infinite loop
My assumption is that I am clearly missing something, I can’t be the only one trying to have a “main dashboard” with a bunch of master switches to quickly turn on/off and view the lighting status of a room at a quick glance.
@dbaq welcome to the community. Well, I happen to have the exactly the same setup.
See below for a quick galance that I use a True/False variable to aggregate my office lights’ status, and I can toggle this tile to turn both lights ON or OFF.
Create a “Toggle Office Light” Rule. (This rule does NOT have any trigger, and will only be executed when I tap the Variable Tile from my first screenshot above.) This rule will toggle both my office lights and update the variable state accordingly.
Create another rule to aggregate the lights’ status to the isOfficeLightOn variable. This rule will be trigger when either of the light is turned ON or OFF, and note that I have the IF Condition in the Rule Flow set to ANY (OR), not ALL (AND). So the variable isOfficeLightOn will be set to true if any of the light is turned on, and only set to false when both lights are off.
Add this isOfficeLightOn variable to the dashboard as a Variable Tile, and configure its dimension, style, icon as desired. The key step here is to make sure the Action(tap) field is set to “Open Hyperlink”, and use the $.runRule("rule_id") syntax with the Rule ID from the rule created in step 2 in the Hyperlink field. So when this rule is tapped, it will execute the rule.
Note: make sure the rule_id is wrapped within the double quotes, and the rule_id can be found from the URL in the rule editor page when editing the rule.
I don’t really need to use a virtual switch over a variable but I would like to have the glow effect to keep the style consistent across my dashboards. And as far as I can see, it is only available with switches/lights. There is no Enable Glow option for a variable tile, correct?
My last feedback (and maybe I should post it somewhere else) is that I cannot select outlined icons. Is there a way to update the tile configuration to select the outline version of that icon? I am looking at the DOM and the SVG is different.