I have a logic problem that is likely easy to workaround but after searching for the past day I can’t solve it…
rule "A.Work.AM"
when
Time cron "0 45 02 1/1 * ? *"
then
if (F_A_Work_AM == 1.0) {
Main_Light_DEN.sendCommand(ON))
end
… returns an log entry of “Error during the execution of rule A.Work.AM: An error occurred during the script execution: Cannot assign a value in null context.”
F_A_Work_AM shows a value of 1.0 while I run this…
I want this to run at 0245 but only if F_A_Work_AM is on (value 1.0), else do nothing.
I’ve tried quotes, direct channel entries, etc. I’ve thrown several Hail Mary’s hoping something would work but I’m stuck.
Is there no way to have something fire at a certain time ONLY IF a Flag/Switch is on?
Thanks.