Chauffe-eau : reprise de 16 h a 20 h apres coupure en pleine chauffe, mesure sur 10 min ; bilan HC de midi

This commit is contained in:
Tallagrand Thierry
2026-10-07 14:40:21 +02:00
parent b34b68408c
commit 16d1f8ee2b
8 changed files with 101 additions and 15 deletions

View File

@@ -282,6 +282,7 @@ const {
} = normalized;
let offJourFaible = false;
let jourFaibleState = 'none';
let coupeEnChauffe = null; // horodatage a ecrire si la coupure tombe en pleine chauffe
if (advisorEnabled && ecsNuit) {
const energieConnue = Number.isFinite(ecs24hKwh);
const eauFroide = energieConnue && ecs24hKwh < ECS_EAU_FROIDE_KWH;
@@ -292,8 +293,11 @@ if (advisorEnabled && ecsNuit) {
? pvPowerW >= houseAcPowerW
: pvPowerW - houseAcPowerW >= autoPowerW);
const heure = Number.isFinite(now.hour) ? now.hour : -1;
// 07/10 : coupe en PLEINE CHAUFFE a la fin des HC de midi (BOOST encore a 2,3 kW
// a 14:24) -> l'eau n'est pas a 65 °C : il reprend aussi de 16 h a 20 h.
const coupeEnChauffeAujourdhui = (input.coupe_en_chauffe || '').startsWith(now.date || '?');
const securiteSoir = heure >= ECS_SOIR_DEBUT_H && heure < ECS_SOIR_FIN_H
&& !(Number.isFinite(ecsJourKwh) && ecsJourKwh >= ECS_EAU_FROIDE_KWH);
&& (!(Number.isFinite(ecsJourKwh) && ecsJourKwh >= ECS_EAU_FROIDE_KWH) || coupeEnChauffeAujourdhui);
const veutChauffer = !energieConnue || heuresCreusesEdf || eauFroide || solaireCouvre || securiteSoir;
offJourFaible = true;
jourFaibleState = !energieConnue ? 'jour_faible_energie_illisible'
@@ -305,6 +309,10 @@ if (advisorEnabled && ecsNuit) {
if (veutChauffer !== waterHeaterSwitchOn) {
powerSwitchAction = veutChauffer ? 'turn_on' : 'turn_off';
powerSwitchDesiredOn = veutChauffer;
// Coupure alors qu'il chauffait (puissance mesuree au-dessus de l'arret).
if (!veutChauffer && Math.max(observedPowerW, normalized.observedPowerPrevW ?? 0) > 150) {
coupeEnChauffe = `${now.date} ${String(now.hour).padStart(2, '0')}:${String(now.minute).padStart(2, '0')}`;
}
} else {
powerSwitchAction = 'none';
powerSwitchDesiredOn = waterHeaterSwitchOn;
@@ -406,7 +414,8 @@ return [{
powerSwitchDesiredOn,
offJourFaible,
jourFaibleState,
alerteChauffeEau
alerteChauffeEau,
coupeEnChauffe
}
}
}];