Can each action have its own condition?

I’m working on a rule that is triggered by a virtual switch when I say “Alexa, I’m Leaving”. I want to do these actions with conditions in HE:

  1. Turn off lights only if time is between 12am and sunset-60.
  2. Turn off virtual switch always.

Is there a way to make the condition only apply to 1? So far I can’t find a way to do it.

BTW - I have several virtual switches which I use Alexa to trigger a HE rule by turning on. These seem to only work if the switch is off when Alexa turns on so I have to turn off in each HE rule. Is there an easier way to do this?

  1. Do an IF-THEN For Time of Day Capability between two times

  2. In the settings for your virtual switch, Enable auto off (highlighted). There are a few options for how long before it turns off.

You can have the virtual switch do that itself. There's a function in the virtual switch driver for "Auto-Off".

Yes, you can do this but you would have to do it based on the virtual switch turning on. In your rule you can make the conditional actions be as simple or as complex as you want.

Download the Hubitat app