I have a rule that I've brought with me from the old days of Smartthings and CoRE. Yes, it's that dated. I've created it in RM 4.0. But, I have a problem with it. It's not a huge issue, but I want to figure out how to make it what it was. The rule works except for when sunrise hits and the lights are on. Then they don't turn off and stop reacting. But I don't want the light to turn on during the day. I wrote in a reset so the light turns off after an hour and resets the dimmer to 3 to account for this, but I'd like to figure in the conditions.
Concept: open door after sunset, light on changes a virtual dimmer -1
close door light stays on
open door light stays on changes virtual dimmer -1
door closes sees virtual dimmer is <2 turns off light - resets virtual dimmer to 3
Any idea how I can add in a condition so that the lights turn off after sunset?
Could you change the first IF condition by removing the Time between Sunset and Sunrise condition?
OMG - You know how you look at something too long and then someone else pops into the forum and sets you straight? I was today years old when that happened to me.
I've been running over this rule for 3 days now in my head. Thinking it through and not once did I notice that.
And I was JUST telling someone not to wait too long to put something in the forums when you can 't figure it out.
Glad I could help
Trust me, you're not alone in getting stuck like you did...
Before I noticed the solution I did wonder whether the rule could have been simplified in some way. The text-based description you gave seemed straight forward but it became more complicated to translate this into the various conditions in the rule. Perhaps individual IF conditions that mirror the 4-line description you gave might make it easier to interpret and maintain?
Hmm ... yes. The second if statement group will go away as long as I don't run into issues with it turning off. I have the dimmer count so that nothing happens on the second set of open and close. the 3rd close triggers the action to turn off. I put the back up turn off alone so that i can delete it without making my rule look like it fumbled through it. Definitely meant to be temporary.
Much simpler now, nice work @april.brandt
I'm sorry to report that it's not working now. I'll have to reevaluate later today.
You may need to change the condition in the ELSE-IF to be >= 2, rather than just >2. I think >2 will mean it will never be decreased to 1 and loop back around to 3 and turn the light off. Hope this helps.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.