Question concerning rule logic

I'm trying to create a rule which will turn a Kasa color bulb a certain color depending on the month. I have several actions, but I don't see how to connect them to the conditions I've defined. For example orange in October, green in December, and red in July. Am I going about this the wrong way?

-Thanks

You need to use conditional statements -- IF THEN ELSE.

IF (Between July 1 and July 31) THEN
do one thing
ELSE IF (Between October 1 and October 31) THEN
do two thing
ELSE IF (Between December 1 and December 31) THEN
do three thing
END-IF

1 Like

You need to add logic in the actions that use the conditions you set...

For instance, add an "if-then" above the red action, using the condition you set. Then add an "elseif" before the green action, and another "elseif" before the orange action. Then add an endif at the end.

1 Like

Thanks! It took me a bit to learn how to nest the IF statements.

1 Like

Thanks. See my response to rob9.

Have you created a trigger for the rule?

1 Like

Yes, I had the trigger. I found it easier with the conditions already intact, to just create the rule actions from scratch.

-Thanks

1 Like