Skip to content

Commit 951d585

Browse files
Copilotdorkmo
andcommitted
Fix relay trigger validation to use correct variable references
Remove redundant checkbox selectors that used wrong class names (.high-alarm-checkbox instead of .high-alarm-enabled). The validation now correctly uses the already-defined highAlarmEnabled and lowAlarmEnabled variables. Co-authored-by: dorkmo <[email protected]>
1 parent 4398eee commit 951d585

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

TankAlarm-112025-Server-BluesOpta/TankAlarm-112025-Server-BluesOpta.ino

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,8 +1042,6 @@ static const char CONFIG_GENERATOR_HTML[] PROGMEM = R"HTML(
10421042
alert("You have set a relay target but have not selected any relay outputs for " + name + ". The configuration will be incomplete.");
10431043
}
10441044
// Validation: warn if relay trigger is set to an alarm type that is not enabled
1045-
const highAlarmEnabled = card.querySelector('.high-alarm-checkbox')?.checked;
1046-
const lowAlarmEnabled = card.querySelector('.low-alarm-checkbox')?.checked;
10471045
if ((relayTrigger === 'high' && !highAlarmEnabled) ||
10481046
(relayTrigger === 'low' && !lowAlarmEnabled)) {
10491047
alert(`Warning: Relay for ${name} is set to trigger on "${relayTrigger}" alarm, but that alarm type is not enabled.`);

0 commit comments

Comments
 (0)