I have 10 automated shades in my sunroom. I use PLEG to close and open them based on x hours before or after sunset etc. The goal is to close some shades depending on if the sun is beaming in on that side of the room. This works no problem.
My issue is that when the weather is no good and the sun is not shining, I want all of the shades open. If the weather turns good then I want to resume my normal open/closed schedule. I used the weatherunderground plugin and created a PLEG condition to look at the grouped wx condition. This worked perfectly, well too perfectly. I poll the wx every 3 minutes. Sometimes the status would change from cloudy to sunny every 3 minutes. This caused the shades to go up and down and annoyed my wife lol. So… I didnt want to change the polling on the wunderground plugin because I use the temperature for other conditions in other scenes and would rather have more current data.
So… I wanted to have the wx status be true for 15 minutes before the condition became true. The only way I could do this was this way:
1st condition:
cWxBad tCloudyOvercast OR tWxFog OR tWxRain OR tWxSnow OR tWxThunderstorm OR tWxFreezingRainSleet OR tWxMostlyCloudy OR tWxFlurries OR tWxHaze
Then my second condition that uses the first one (I couldn’t combine them for some reason)
cWxBadFor15Min cWxBad AND (cWxBad; Now > 15:00)
Finally my third condition to open all the blinds if the wx is bad (the lockout is a vSwitch to defeat the condition if I want to)
cOpenAllShades_wxNotClear pSunRoomLockoutStatus==0 AND mHome AND sSunriseToSunset AND cWxBadFor15Min
This seems to work OK. The problem is when the wx turns back to clear. (I added the repeats but I am not sure if this was the right thing to do Also cWxGoodFor15Min follows the same logic as the cWxBadFor15Min condition above except it has different wx triggers)
cCenterShadesClosed_wxClear Repeats pSunRoomLockoutStatus==0 AND mHome AND s3hrPastSunrise_to_30minBeforeSunset AND cWxGoodFor15Min
The wx was flip flopping back and forth today and at several points I checked these three conditions individually and they were all true and had previously been false
pSunRoomLockoutStatus==0 --true
mHome --true
s3hrPastSunrise_to_30minBeforeSunset --true
cWxGoodFor15Min --true
But the cCenterShadesClosed_wxClear remained false??? I can’t figure it out, each individual portion was true. I added the repeats functionality but that didn’t change anything right away, not sure if I needed to let the schedule be true again or not. The only thing I changed is the “being true for 15min”. It works fine if it evaluates at the “top” of the schedule.
I thought about using cWxGoodFor15Min and !cWxGoodFor15Min instead of 2 separate conditions but want the status to be true for 15min before any action happens. So basically it has to stick with that status for 15 min and if it flip flops the 15min starts over again.
Is there anything obvious I am missing? Is there an easier way to do all of this? I know I am chaining conditions together in like 3 layers so I dont know if that is an issue.
Any help would be appreciated!