forked from jens/Automation
Rework
This commit is contained in:
@ -201,7 +201,7 @@ public class LocationProvider
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesBySpeed();
|
||||
for (Rule oneRule : ruleCandidates)
|
||||
{
|
||||
if (oneRule.applies(this.getParentService()))
|
||||
if (oneRule.applies(this.getParentService()) && oneRule.hasNotAppliedSinceLastExecution())
|
||||
oneRule.activate(getParentService(), false);
|
||||
}
|
||||
}
|
||||
|
@ -147,7 +147,7 @@ public class WifiBroadcastReceiver extends BroadcastReceiver
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByWifiConnection();
|
||||
for(Rule oneRule : ruleCandidates)
|
||||
{
|
||||
if(oneRule.applies(automationServiceInstance))
|
||||
if(oneRule.applies(automationServiceInstance) && oneRule.hasNotAppliedSinceLastExecution())
|
||||
oneRule.activate(automationServiceInstance, false);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user