TimeFrame repetition fix

This commit is contained in:
jens 2022-03-26 20:00:50 +01:00
parent 5a09962cc9
commit c688a4c460
2 changed files with 18 additions and 0 deletions

View File

@ -331,6 +331,15 @@ public class Rule implements Comparable<Rule>
{ {
if (oneTrigger.hasStateNotAppliedSinceLastRuleExecution()) if (oneTrigger.hasStateNotAppliedSinceLastRuleExecution())
return true; return true;
/*
Workaround for repetition in TimeFrame triggers
*/
if(oneTrigger.getTriggerType().equals(Trigger.Trigger_Enum.timeFrame))
{
if(oneTrigger.getTimeFrame().repetition > 0)
return true;
}
} }
return false; return false;

View File

@ -334,6 +334,15 @@ public class Rule implements Comparable<Rule>
{ {
if (oneTrigger.hasStateNotAppliedSinceLastRuleExecution()) if (oneTrigger.hasStateNotAppliedSinceLastRuleExecution())
return true; return true;
/*
Workaround for repetition in TimeFrame triggers
*/
if(oneTrigger.getTriggerType().equals(Trigger.Trigger_Enum.timeFrame))
{
if(oneTrigger.getTimeFrame().repetition > 0)
return true;
}
} }
return false; return false;