Aeotec energy switch

I'm having some trouble getting this to work.
I have an Aeotec energy switch.
I'd like to accomplish the following

If power < 50
Then open contact 1
Wait 2 mins
Close contact 1

Thanks in advance
Art

What app are you trying to get it to work in, and can you post a screen shot of what you have done so far?

Can you also describe what you are trying to automate in simple terms? E.g., what device/action are you accomplishing w/the automation?

Looks like you've set the virtual contact as a trigger, but from your description in your first post, it sounds like you want the state change of the virtual contact to be an Action that runs when the power is >50.

So create an action that change the state of the virtual contact to open before your Delay statement. Remove the trigger for the virtual contact.

Also, your IF statement won't ever run as it requires that the power level is >50, which then opens the contact...I think you want to have that set to "IF (Virtual washer Done contact open" and then complete the rule by closing the contact again. (If your intent is to reset the contact to closed at the end of the rule.)

Also, if you are using this for a notification when your laundry is done, there are several laundry automations that might work well for you, and are easier to set up. Like this one:

I need to make my own. When the Virtual Contact is open (when power is < 50) Alexa makes an announcement. Alexa can only create actions using sensors. I already tried to install "Alexa Speaks" But I guess it's over my head.
So I'm trying to accomplish the following.

Hubitat
Aeotec power is < 50
Then open the Virtual washer done sensor/contact

Alexa Routine
(Alexa will see the open contact and make the announcement)

Hubitat
Wait 2 mins
then
Close the Virtual washer done sensor/contact

Should be ready for the next wash cycle.

It doesn't need to be overly complicated. I don't think you're using the same device I am (an Aoetec HEM) for measuring power, but the concept should work the same.

Use custom attribute for the trigger type, and also add runIn(1, off) to your virtual contact sensor so it will only be on for a second before turning itself off. You don't want the 2 minute delay to be on the virtual device because if the washer dips below the threshold when it's pausing during cycles, it will give you constant false announcements. Of course all washers will behave differently, so the delay needs to be adjusted for your particular washer. If it never pauses for more that 30 seconds throughout any of its cycles for example, you could safely lower the wait time to 1 minute to get washer finished announcements sooner after the cycle completes.

Example for your virtual contact/switch

def on() {
    sendEvent(name: "contact", value: "open")
    sendEvent(name: "switch", value: "on")
    runIn(1, off)

Rule example

Thanks for your help. I'm not sure how to add the code to make a virtual sensor. Your help would be greatly appreciated.

I'm using a Aeon Labs DSC06106-ZWUS - Z-Wave Smart Energy Switch

The virtual contact sensor is named
Virtual washer done sensor

I'm not sure how to add the code to make a new sensor