How to check for variable and then do an action?

I'm trying to setup up rules like when its tuesday and YellowBin variable is true, then say to google home "put yellow bin outside". And then set YellowBin variable to false.
Then next week on the same day it'll check the variable, since it's false, it will go another pathway and say "put green bin outside".

I've got the day thing sorted. Just dont know how to get these IF statements to work. Doing it on hubitat looks complex compared to doing it via java haha

I don't think you've fully explained what you're trying to do. What happens the third week? Does it go back to the yellow bin and then continue with alternating colors on alternating weeks?

If so:
Rule trigger: Every Tuesday (and probably a certain time)

Rule actions:
If YellowBin is true then
say "put yellow bin outside"
set variable YellowBin false
say "put green bin outside"
set variable YellowBin true
end if

1 Like

yea the logic i understand. Just doing it via the UI seems verbose. And kinda confusing.

Can you send a sample IF x THEN y ELSE z screenshot from your HE

Here you go:

Ignore the "%device%" line... that is from a prior version of this test rule.

There is definitely a bit of a learning curve when figuring out how to navigate through the Rule Machine UI, but its worth taking the time to figure it out as it's a very capable rule engine with lots of flexibility.

ya finally got it working! thanks heaps for that snippet!