Help with rule

I have a rule that is to turn on some lights when someone arrives between sunset and sunrise. The rule works but it seems to ignore the condition as the lights come on any time of day. How can I adjust this rule to handle the condition? Thanks


I don't see where you have actually used your condition - are you showing us the entire rule? I am wondering if the presence of the condition list is causing confusion for some users. It's just a handy place to see and edit them, but they still have to appear inline in the rule or they are sitting there unused - the rule won't automatically use them as a condition

3 Likes

Make the time between sunset and sunrise a required condition.

Is this what you are suggesting will work?

3 Likes

The adjustment to the rule looks good. I think that solves your original issue.

Only additional thing you may want to consider is whether you have any other rules that trigger those lights to turn on, like motion activated rules, etc. If so, you may want to combine the wait event and off action into a single off action that includes a delay where the action is cancellable, allowing other rules to cancel it if they are triggered.

3 Likes

Thanks for the suggestion. I do have other rules that could trigger at the same time. I don't think any of the rules will be affected much if I don't make this one cancellable.

No worries, at least something to keep in mind if it comes up.

I had a chance to finally test this. Unfortunately it did not work. I returned after sunset and the lights did not go on. I am uploading a image of the rule.

A couple of things you may want to check / do:

  • In the logging drop-down, turn each of the options on (just while you are troubleshooting). This will allow you to see more details in the logs when you next expect to have triggered the rule
  • Take another look at the rule one evening after sunset to check the current values, in particular the required expression, i.e. is it showing as true when you expect
  • In the mobile app on each phone used in the trigger, make sure they are logged into the HE hub where the rule is running, with Geofencing setup and turned on
  • Try to find some logs / events for presence of the mobile phones under the Events section on the device edit page

Thanks. I turned on all the logging. I do know the presence is working for the phones as I did check the logs when I realized the rule did not run.