I’m so frustrated trying to learn Hubitat. Got my C8 installed, and the necessary devices included. All I want to do is create an automation that I can trigger with a virtual switch to turn a pump on for 10 minutes. Can’t find Virtual Switch as a trigger, even though it was added as such. Can someone please detail all the steps?
There is no category for "virtual" devices in rule machine that separates them from physical devices. So, it will just show as a switch in the rule machine device list. You just have to remember what you called it when you created it.
I have a virtual switch that I turn off after I have taken clothes out of the dryer so I can stop the reminders. It is called "DryerDone" In the list below,some of the other switches are actual switches others are virtual. (Note: I have a Door lock/unlock one that I also created a virtual switch for as well. I added (Virt) to the name for another reason - but that is another trick you could use to separate out the virtual from the non.)
Thanks but I don’t see where the virtual switch is used as the trigger. Please explain.
Plus I don’t see how to edit my posts. I called it “Pump” but it doesn’t show up anywhere except in devices
So I’m guessing your “Pump Control” is the virtual switcj?
Did you select Automations-Add then Basic Rule?
“Pump control” is the virtual switch. It’s used to trigger the rule
“Pump actual” is the real Pump motor switch
I always use rule machine but I suppose you can do it in basic rules too
I would start here:
Can I ask a more basic question, why do you want/need a virtual switch? You can just turn on the physical device directly without a virtual switch being involved.
I assume you are controlling this pump via some smart light switch or outlet?
Yay! I did it! Thanks everyone!
One more question: Where do I find Cancel Delayed Actions ?? And what does it do?
Next, I want to create a dashboard Tile that my wife can use to run this.
BTW, this Rule preheats my hot water to the kitchen sink or dishwasher, using a seperate circulator.
The Rule 5.1 docs have a list of where to find and action as well as a description of what many features do, including Cancel Delayed Actions, so I'd start there.
Do you just want it to turn off a set amount of time after being turned on, always? If so, as suggested above, you don't need a virtual switch. You also don't even need a Rule to do this, though you certainly can if you want more customization; you could use the new Power and Energy Manager "Maximum Usage" child app to turn off a a switch after a set amount of time of being on — effectively the same as the proposed rule but easier to set up, and no need to figure out things like the above. (No need to change if you have something already and it's working, though!)
Just create a dashboard that exposes the "trigger" device for your automation (your actual trigger if it's a Rule Machine rule, or the actual device if that's what it is or you went with the Power and Energy Manager route because this is just how you always want the device to work).
The cancel delay actions is to handle the case that the rule gets triggered again before it has completed. This can create problems due to delays within delays.
So the cancel delays kills the last delay that is timing out and the new action starts another 10 minutes cycle. So the rule will run the pump for 10 minutes AFTER the LAST trigger.


