I have a few simple dim-at-sunset/brighten-at-sunrise programs and have been trying to debug them. Originally I was using a folder with sunrise scheduling, but it was hard to debug. So instead I set a state variable to control "brightening", "dimming", and "normal" state and have folders keying off those state variables.
What I noticed: the folder status (set by the variable in response to schedule) is correct, but the program status (set by the devices) is not. If I Query the devices involved, then suddenly all the programs run and the system behaves as expected.
Why wouldn't the device states be accurate? Is this indicative of a communication problem?
For reference, here's a snippet of the programs I'm using:
2. Start Brightening at Sunrise - [iD 0010][Parent 0022]
If Time is Sunrise Or Time is Sunrise + 1 hour Or Time is Sunrise + 2 hours Then $Kitchen_Light_State = 2 Else - No Actions - (To add one, press 'Action')
I have a "Brightening State" folder:
=================================================================================== 2. Brightening - [iD 000D][Parent 0022]
Folder Conditions for '2. Brightening'
If $Kitchen_Light_State is 2 Then Allow the programs in this folder to run.
In the folder, I have a variety of programs like this:
Brighten KL if on - [iD 0043][Parent 000D]
If Status 'Kitchen Dimmer - Entry Master' is not Off Then Set Scene 'Kitchen Main Lights / Kitchen Mains Slow Bright' On Else - No Actions - (To add one, press 'Action')
...and a "done" program:
Done if lights are bright or off - [iD 000F][Parent 000D]
If ( Status 'Kitchen Ceiling Fan-Light' is Off Or Status 'Kitchen Ceiling Fan-Light' is 100% ) And ( Status 'Kitchen Dimmer - Entry Master' is 100% Or Status 'Kitchen Dimmer - Entry Master' is Off ) Then Wait 5 seconds $Kitchen_Light_State = 0 Else - No Actions - (To add one, press 'Action')