Notification when ac on and window open isn't working

Hi all,

I tried setting a rule that when the ac is on and the window is open, a virtual contact sensor is set to open so Alexa will notify it.
What am i doing wrong?

The rule looks ok. What are you seeing (or not) for the virtual contact sensor events? Have you tried turning on logging for the rule and checked the logs?

What does the rule look like on the Alexa side?

Here is the rule in Alexa.

1 Like

I find that putting a short delay between the on and off of my virtual contact switches helps Alexa "see" them better. Just five seconds or so.

2 Likes

Another dumb question. Why use a virtual contact when you can simply expose the actual contact to alexa? I ask only becuase ive had issues myself of sensors/virtual sensors getting out of sync...

I guess the virtual contact sensor indicates the combined status of the A/C being on and the "actual" contact sensor being open, which may not always be the case when the "actual" contact sensor is open. I'm not sure if Alexa can also do the same logic of combining the status of both devices....

Two things

  1. I think the on/off occur so fast that it isn't being seen at the Alexa end. You need to move the delay statement to be before the off statement.

  2. This rule would be much simpler if it were built using a required expression.

Required expression: A/C is on

Trigger:
Window opens and stays that way for 4:30

No Conditions needed

Actions:
On: Virtual window contact
Delay 0:05:00
Off: Virtual window contact

I expect the reason for needing the rule structured the way it is will be to handle when the A/C is turned on while the window (contact sensor) is already open.

1 Like

I would make that a separate rule that also uses a required expression.

Rules are free. And multiple simple rules using required expressions is much less intensive on the hub than a complex rule without a required expression. Required expressions prevent the trigger from being evaluated. Versus @yanivsh23's rule which does not prevent that.

1 Like

@rlithgow1 How exactly will you build the routine in Alexa? I tried setting delay but still no notification.

@rlithgow1 Alexa doesn't recognize contact sensor, at least for me so I use a virtual switch

@aaiyar What happens when the window is already open and the i turn on the ac? There is no trigger. How will you build it from the opposite side that the trigger is the ac turning on? required expression window open?

@sburke781 Exactly