Rule Machine error

I made rule machine last year to turn our hue porch light appropriated colors during October and December. Not sure it ever worked. This October, it turns on porch light, but shortly thereafter turns it off. Can anyone tell me if this rule is correct?

The rule looks fine for turning on your light and setting the color/level; however, it does not contain anything about turning off your light. What rule do you use to turn off the light?

1 Like

How often does your weather station report? The next report trigger toggles the lamp off.
I am going with the toggle command in the first if statement. If it was on it will be toggled off. Try the set color instead. Also as JB10 stated, what turns them off. Take a look at the logs.

1 Like

As @croweflight says that toggle command definitely looks like the culprit and should just be setColor like the other two. Every time your weather station reports an illuminance reading, the rule will run. With that said, how often do you want this rule to run? Do you want this rule to run if it gets dark out during the day time due to a storm or is this an evening only rule (at least in your head)?

It was indeed the toggle command. I changed it to set color. It was apparently toggling the light off after it turned it on in October. Works now. Thanks for the extra set of eyes.

Porch light came on during the eclipse. But hasn't any other time during the day unless the battery went out in the ambient weather illumination sensor.

One thing about your rule is that it will run every time the weather station reports below 800. So, if it reports 770, then 720, etc..., your rule will run. The way your rule is constructed, this is probably fine.

Some people like to use a Private Boolean so that the rule only runs once. In this scenario, the "off" rule would be used to reset the Private Boolean of the "on" rule.

2 Likes