Don't raise alerts if loop is disabled.
(cherry picked from commit dc7fd2b)
This commit is contained in:
parent
9d6ff73b34
commit
9649682ae3
|
@ -139,7 +139,8 @@ public class ComboPlugin implements PluginBase, PumpInterface {
|
||||||
if (localLastCmdResult != null && !localLastCmdResult.success) {
|
if (localLastCmdResult != null && !localLastCmdResult.success) {
|
||||||
long now = System.currentTimeMillis();
|
long now = System.currentTimeMillis();
|
||||||
long fiveMinutesSinceLastAlarm = lastAlarmTime + (5 * 60 * 1000) + (15 * 1000);
|
long fiveMinutesSinceLastAlarm = lastAlarmTime + (5 * 60 * 1000) + (15 * 1000);
|
||||||
if (now > fiveMinutesSinceLastAlarm) {
|
boolean loopEnabled = ConfigBuilderPlugin.getActiveLoop() != null;
|
||||||
|
if (now > fiveMinutesSinceLastAlarm && loopEnabled) {
|
||||||
log.error("Command failed: " + localLastCmd);
|
log.error("Command failed: " + localLastCmd);
|
||||||
log.error("Command result: " + localLastCmdResult);
|
log.error("Command result: " + localLastCmdResult);
|
||||||
PumpState localPumpState = pump.state;
|
PumpState localPumpState = pump.state;
|
||||||
|
|
Loading…
Reference in a new issue