mirror of
http://10.0.2.1:3031/sauer/bfa-dryer-design.git
synced 2026-06-30 10:06:42 +10:00
Move Hot Fan to Speed Control, rename pages, burner auto-enables fan
This commit is contained in:
parent
6374749397
commit
2da06ca462
@ -840,8 +840,17 @@ function toggleSim(id) {
|
||||
if (!simState[id]) simState[id] = {on: false, value: 0};
|
||||
simState[id].on = !simState[id].on;
|
||||
|
||||
// If this is an automation card, activate/deactivate all its rules
|
||||
// Burner turns on Hot Fan automatically
|
||||
const card = findCard(id);
|
||||
if (card && card.type === 'burner') {
|
||||
const fanCard = findCardByLabel('Hot Fan');
|
||||
if (fanCard) {
|
||||
if (!simState[fanCard.id]) simState[fanCard.id] = {on: false, value: fanCard.sp_default || 50};
|
||||
simState[fanCard.id].on = simState[id].on;
|
||||
}
|
||||
}
|
||||
|
||||
// If this is an automation card, activate/deactivate all its rules
|
||||
if (card && card.type === 'automation' && card.rules) {
|
||||
card.rules.forEach(r => {
|
||||
if (!r.target) return;
|
||||
@ -894,6 +903,10 @@ function findCard(id) {
|
||||
for (const p of layout.pages) { const c = p.cards.find(x => x.id === id); if (c) return c; }
|
||||
return null;
|
||||
}
|
||||
function findCardByLabel(label) {
|
||||
for (const p of layout.pages) { const c = p.cards.find(x => x.label === label); if (c) return c; }
|
||||
return null;
|
||||
}
|
||||
|
||||
// ══════════════════════════════════════════════════════
|
||||
// COMMENTS
|
||||
|
||||
Loading…
Reference in New Issue
Block a user