I have an event with a TimeNow trigger. The events have two conditions, "Season = fall" OR "Season = winter". Since it's now fall, the action of the event should trigger but it doesn't.
However, if I change the condition to "Season = fall" AND "Season = winter", the action runs.
I have looked through the CheckConditions sub several times, but I can't figure out what's wrong.
/Dali
Debug from the OR-version:
Code: Select all
2010/09/26 17:24:00 [Events] 1a. Running TimeNow query 'SELECT * FROM events, triggers WHERE events.trigger1 = triggers.id AND triggers.type = 1 AND events.enabled AND triggers.param1 = 17 AND triggers.param2 = 24'
2010/09/26 17:24:00 [Events] 1b. Got 1 result(s).
2010/09/26 17:24:00 [Events] 2c. TimeNow trigger on event id 11 named 'Tänd fönsterbelysning på morgonen' with trigger condition 'Hour = 17 and Minute = 24'
2010/09/26 17:24:00 [Events] 2c. Check condition 'fall = fall' = True
2010/09/26 17:24:00 [Events] 2d. Condition with id 4 returned True
2010/09/26 17:24:00 [Events] 2c. Check condition 'fall = winter' = False
2010/09/26 17:24:00 [Events] 2d. Condition with id 3 returned False
2010/09/26 17:24:00 [Events] 2e. Event id 11 named 'Tänd fönsterbelysning på morgonen' has has failed CheckConditions, discarding.
Code: Select all
2010/09/26 17:26:00 [Events] 1a. Running TimeNow query 'SELECT * FROM events, triggers WHERE events.trigger1 = triggers.id AND triggers.type = 1 AND events.enabled AND triggers.param1 = 17 AND triggers.param2 = 26'
2010/09/26 17:26:00 [Events] 1b. Got 1 result(s).
2010/09/26 17:26:00 [Events] 2c. TimeNow trigger on event id 11 named 'Tänd fönsterbelysning på morgonen' with trigger condition 'Hour = 17 and Minute = 26'
2010/09/26 17:26:00 [Events] 2c. Check condition 'fall = fall' = True
2010/09/26 17:26:00 [Events] 2d. Condition with id 4 returned True
2010/09/26 17:26:00 [Events] 2c. Check condition 'fall = winter' = False
2010/09/26 17:26:00 [Events] 2d. Condition with id 3 returned False
2010/09/26 17:26:00 [Events] 2e. Event id 11 named 'Tänd fönsterbelysning på morgonen' is validated, running action(s).
2010/09/26 17:26:00 [Events] 3a. Running action with id 8 for Event with id 11
2010/09/26 17:26:00 20609F00FF
2010/09/26 17:26:02 ACK=> 37
2010/09/26 17:26:02 [Events] 1a. Running DeviceChange query 'SELECT * FROM events, triggers WHERE events.trigger1 = triggers.id AND triggers.type = 3 AND events.enabled AND triggers.param1 = 38 AND triggers.param2 = Value'
2010/09/26 17:26:02 [Events] 1b. No result.
2010/09/26 17:26:02 [Events] 3b. Action with id 8 named 'Tänd fönsterbelysning' executed!