Mode status seemingly ignored in http trigger event

I currently have a rule that is triggered by an http event.

For example, the http event is based on a new outdoor brightness observation that then turns on indoor lights when mode is Home. Unfortunately, it seems the rule completely ignores non-Home modes, and continues to turn lights on (including in Night mode). I’m obviously missing something.

There’s a known bug with the next-generation SmartThings connection that Mode event subscriptions aren’t always getting setup as expected.

You can work around this by adding a Mode tile to a dashboard as that forces the system to setup an event subscription.

Perfect. Thanks for your help as I move off webcore and go premium. Sharptools is doing everything I need to so far.

I have another question about my rule. Can a time condition be set for 30 minutes before sunset AND 15 minutes after sunset? I do see that it can be a trigger, but wondering if there’s a special code for an IF condition?

Currently, sunset/sunrise offsets are only on the triggers.

As a workaround, you could use a separate rule to set a variable to true using a trigger with your desired sunset/sunrise offset and then use that variable as a condition in your other rule.

Perfect thanks. I’ll try that.

I thought I had it figured out how to set the variable, but now I’m not sure. I tried following the details on variables, but I don’t think I quite understand how to set a variable based on the trigger event, and whether I need a condition.

Coming from webCoRE myself you have to rethink the way you set up rules with multiple triggers.

In your case since sunrise and sunset are technically two separate events then you’ll need to create two separate rules and don’t use any if conditions in the flow.

Sorry if it doesn’t make sense. Josh will probably be able to explain it better than I can.

If I understand correctly, you want to use a condition - BETWEEN 20 mins before sunrise and 1 min after sunset, right? If so, you rule may look like this. Note that this rule will be triggered twice a day as @Nathan_Davis mentioned that these two triggers are basically two separate events. Then I use an IF condition to determine if I should set the variable to TRUE or FALSE when this rule is triggered.

Then you can use this variable in other rules by checking it’s value in the IF condition. If true, the current time is between 20 mins before sunrise and 1min after sunset.

Or please let me know if this is not the codntion you were looking for.

1 Like

Thank you.

Yes, I am working to have “If true, the current time is between 20 mins before sunrise and 1min after sunset.” Based on your example, I would need the condition time too? Why only before sunrise and not also after sunset?

I am coming from webcore and still wrapping my mind around this interface.

Each of the items in the Trigger section cause the rule Flow to start running.

So the rule is executed at the first trigger (20 minutes before sunset) and again at the second trigger (1 minute after Sunset).

So what @James is doing here is setting the two triggers for the time ‘range’ that you are looking for (really just two time events from the rule’s perspective), then the flow is determining which of the two triggers it is. We know that if it’s before Sunset, then it must be the first trigger… and if it’s after sunset, then it must be the second trigger. So it just serves as a way to determine which of the times the rule was triggered at and if your variable should be set to true (start time) or false (end time).

1 Like

Thank you both for the example and explainer.