Hue light turns on and off virtual contact

Hello,

I just started with Hubitat last night (coming over from SmartThings) and I made an automation in Rule Machine that works, I'm just not sure if it's the best way do make the rule or if there's an easier way.

I was hoping a Hubitat expert :slight_smile: could take a quick look and tell me if that's that best way to do what I'm trying to do.

Here's what I want it to do:

When the Hue light turns on (triggered from a Brilliant Dimmer Switch) it Opens the Virtual Contact Sensor.

When the Hue light turns off (triggered from a Brilliant Dimmer Switch) it Closes the Virtual Contact Sensor.

I'm then using the Virtual Contact Sensor to run an Alexa Routine that turns on and off an Alexa only light.

Here's what my rules look like:

image (1)

image

I couldn't see a way to control the Virtual Contact Sensor in the Simple Automations App.

Or see a way to have only 1 rule that does both the ON and OFF of the Virtual Contact Sensor.

Before I go too much further, is this the best/only way to do this or is there a better way?

Thank you!

I think Rule Machine is your best bet, and these rules are fine, though you could also combine it into one rule if you wanted ("changed" trigger and an IF THEN/ELSE in your actions like you'll see in many examples, inxkising the docs). Most sensors only report events, so manipulating a virtual one like this is sort of a special case that Simple Automation Rules is too simole to handle. :grinning:

1 Like

Perfect. Thank you so much! So there is a way to make it one rule. Will be nicer to work with as one rule because I plan to do a few of these rules.
Thanks for letting me know it can be done with If Then/Else.

Have a great day!