I have IF, ELSE-IF, ELSE-IF, ELSE-IF, ENDIF.
The IF is false so it should go on to the first ELSE-IF. This ELSE-IF is TRUE, but it gets skipped. I am very experienced with these kinds of conditionals and this makes no sense to me. Here is my log (read from the bottom up):
Action: // Set Energy Saver, if not already. (skipped)
Action: ELSE-IF (Variable WH_Mode(High Demand) is ? 'Energy Saver'(T) AND Variable Upper(126.8) is >= WH_Normal_Temp(119)-3.5(T) [TRUE]) THEN (skipped)
...
...
Action: // Set High Demand, if not already (skipped)
Action: IF (Variable WH_Mode(High Demand) is ? 'High Demand'(F) AND ( ( Variable Rate_Of_Change(-0.02502) is > ROC_For_HD(1.99)(F) AND Variable PC1(113.6508) is < 90.0(F) ) OR Variable PC1(113.6508) is < 50.0(F) OR Variable PC2(113.8776) is <= 40.0(F) ) [FALSE]) THEN (skipping)
It wasn't that simple, but it was my mistake. My rule is 120 lines long, and I missed and extraneous IF that had no ENDIF. In other languages I have used, this would have been flagged as an error.
I will have to be more careful in the future. Thanks for your help.