Lights aren't turning off at specified time

This has been driving me crazy as it should be a very simple rule, but am not tracking why this is not behaving as expected.
What I'm looking to do:

  • If the time is Sunset and the Porch lights aren't on, then:
  1. turn on the porch lights
  2. Wait until 11pm
  3. Turn off the porch lights
  • If the time is Sunset and the Porch lights are on, then:
  1. Wait until 11pm
  2. Turn off the porch lights

What's happening:
The lights are turning on properly at Sunset.
The lights are not turning off at 11pm.

Attaching a picture of my Rule.

'Porch Lights' is a scene. Currently it just contains one device (a switch that controls the garage side lights). I verified when I manually activate / deactivate this scene, the lights are controlled properly.

Show the whole rule including the triggers please.

Do you have logging enabled? If not, turn it on and see what the logs show for your 'off' time (can adjust for testing).

2 Likes

A comment on the rule structure. The Wait for event and Off are common to both the IF and ELSE-IF. You can rewrite with one IF-THEN or a Simple Condition.

IF (Porch Lights is off) THEN
    On: Porch Lights
END-IF
Wait for event: When time is 11:00 PM
Off: Porch Lights
1 Like

I do have logging enabled and this is what I am seeing in the logs:

The full rule is:

For some reason... tonight the task worked as it should have and the lights turned off properly. Not sure what was different about tonight vs the past couple of nights, but I'll keep an eye on it for the next few days.

Thank you for the help!

I’m glad it is working.

Building on a previous reply you don’t need the if statement at all. Just three simple statements: turn on, wait, turn off. If the light is already on then sending another on command isn’t going to do any harm.

2 Likes

One more thing to consider. I don't use scenes much, but turning a scene off is not the same as turning a device off. Your scene may have a different setting for what happens when an off command is received...

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.