Rule to close blinds

I have this rule I am trying to get to work. (Admittedly I don't know much about how to do this) I tried to test it but it fails? Hopefully, someone can offer some help or advice

Rule Objective -Want screens to come down, every day at sunup plus a couple of hours but only if the contact on the window is closed

Erro Log:

Current Rule I wrote:

Trigger looks ok but your action doesn't look like it has anything to close...

Here is my blinds rule...

Open

Close:

Is there one window contact or multiple to determine if the blind should close? Right now your rule will trigger at sunrise+180 minutes regardless of the state of any contact sensor. There's nothing telling it not to. It'll also trigger when your four window sensors close. That doesn't seen to meet your rule objective.

I'm guessing here but I think you may want to trigger at sunrise+180 when all four contacts are closed. If that's the case then delete the contacts as a trigger and create a Required Expression that they all must be closed.

Your Close: null isn't correct. I'd just delete that action and create a new one similar to the example that rlithgow1 has provided.

You could also set this up in Room Lighting. Add your blind, the add a "don't activate" condition for the contact sensors.

leave your trigger as "When time is Sunrise+180 minutes"

for your actions, add the actions:

IF (Window Sensor 1 is closed AND Window Sensor 2 is closed AND Window Sensor 3 is closed AND Window Sensor 4 is closed) THEN
Close: whatever you call your blinds
END-IF

By having the 4 window sensors being closed in your triggers, if you close your windows at any point during the day, it'll close your blinds

I changed it to this

I now changed it to this.

image.png

Also, Ok, you are correct I forget to select screens. I tested that part they do come down.

Also I and concerned about this expression. I would think it needs to be an "AND" not an "OR". The way it's written seems like either the time or the contact condition would trigger.
I want both to be true for them to close but I don't see a way to change from "OR" to "AND". Any ideas?

I'm going to quote myself here as I believe this is your solution

1 Like

I think I have it right now.

3 Likes

That looks good..