Multiple actions one rule - is this the way?

I'm running the HomeKit integration, have a HomePod Mini, running Homebridge on a NAS via Docker, and Wyze products. Specifically, I have a the Wyze Home Monitoring System and a variety of contact and motion sensors which I would like to get into my Hubitat system.

I'm running the WyzeHub App, but it does not bring in any of the sensors to Hubitat. There is a plugin for Homebridge that does this. So I can get the sensors into HomeKit, but I can't bring them from HomeKit into Hubitat directly.

So, rules...

I know many people have likely done this with IFTTT, but I figure I have HomeKit automations so why pay for IFTTT. I've created a virtual switch in Hubitiat, which I can then push into HomeKit, run automations in Homekit to change the state of the switch based on the Wyze sensor states.

Then, the plan would be to build Rules in Hubitat to change the state of a Virtual Contact Sensor (for example) based on the Virtual Switch state.

My questions are:

  1. Do I need to build separate rules for each sensors?
  2. Could I build one rule with multiple IF-THEN-ELSE-IF statements to cover all the sensors within one rule?
  3. Is there a better way to do this?

THere's probably no right answer to this. You do not need to build separate rules for each sensor and you could build one rule with multiple if/then/elseif statements to cover all the sensors with one rule. However I usually find it easier, especially when playing with something new, to break down what I need into several rules to make it easier to troubleshoot.

I'm not sure I understand why you need a virtual contact sensor, though. You can key RM rules right off the virtual switch.

Fair point which I was just thinking about myself.

I think I ended up here because I made the virtual CS first, hoping to expose it to HomeKit and then to use HomeKit automation to change the state. But I can't do that in HK, so I introduced the virtual switch as the bridge. But you are correct I could simplify things and eliminate the virtual CS.

Download the Hubitat app