Is there someway to have rule triggers be based on events from multiple devices within a single trigger block?
Is there someway to take action on multiple devices within a single action block without having to add each device as a separate device with its own action?
I am trying to recreate a webCoRE automation that will turn on and off several different lights depending on which light was turned on or off. I know I can do it with separate rules and blocks but with 5 different lights that is going to take some time.
webCoRE piston if it helps (button numbers for devices shown because it is a double tap):
The way I’m getting around this and not creating super long rules is to call a scene (which is easier to do in Sharptools since you don’t have to query to get the scene ID). You just need to create an ‘on’ and an ‘off’ scene for each state you’d like to call. By doing this, I’ve found it saves time when multiple triggers call the same set of lights. When any of the scenes have dimmers that you want to change the dimmer level later on, the level only needs to be adjusted in one place (ST scene) and not in each block of actions.
For the trigger, you can enter each of the buttons individually and the rule will trigger if any of them get pushed/held. What I don’t see (which we had in WC) is the ability to trigger based on a double click of the button.
Oh that’s very helpful I think that might be the easiest way to handle these!
For double press (at least for me) all of my light switches had extra buttons. So the light has on/off state and then button #1 (double up) and button #2 (double down) that would be used in the webCoRE rule.
It does look like the functions are there in sharptools I’m just not sure if they are going to work / function the same. I’ll be testing that out in the next few days:
It’s not as easy as creating and using scenes but a lot of people are struggling with reaching the 200 scene/routine limit in ST. If that’s not an issue for you then scenes may be the easiest route.
You will still have to add all the devices twice per rule but if you often control these devices as a group (all on or all off) then the variable makes it easier without adding every device to every rule.
$ lights Variable Rule
$lights on changes to true
$lights on changes to false
$context.event.value is true
turn on light 1
turn on light 2
turn on light 3
turn on light 4
turn on light 5
turn off light 1
turn off light 2
turn off light 3
turn off light 4
turn off light 5
Rule to recreate webcore pistons
device 1 button 1 gets pushed
device 1 button 2 gets pushed
device 2 button 1 gets pushed
device 2 button 2 gets pushed
device 3 button 1 gets pushed
device 3 button 2 gets pushed
device 4 button 1 gets pushed
device 4 button 2 gets pushed
device 5 button 1 gets pushed
device 5 button 2 gets pushed
(context variables are much quicker to add than device events plus they execute faster since it doesn’t have to poll the actual device status)
context.event.deviceName [device 1] button 1
context.event.deviceName [device 2] button 1
context.event.deviceName [device 3] button 1
context.event.deviceName [device 4] button 1
context.event.deviceName [device 5] button 1
set variable $lights True (on)
set variable $lights False (off)
Thanks, that makes sense. Kind of a lot of work so hopefully its a feature that gets added in the future.
The scene way is easier, but for me personally I really like to have all my automations in one spot (i even do simple closet light on / off automations in webCoRE) so that I know whats going on and can easily troubleshoot.