sensor.evcs_batterie_projection_soir : volontairement « indetermine » tant que la prevision est fausse
Incident 27/09 : l'agent annoncait « vers 90 % » de sa tete. La prevision Forecast.Solar sous-estime d'environ 50-60 % : on publie des faits (SOC, ecart de prevision), jamais un SOC projete. Tests 61/61. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011uJ47NxgfpGnuuMr3f2n7Z
This commit is contained in:
@@ -30,7 +30,7 @@ import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import pg from 'pg';
|
||||
import { texteRapport, envoyer, donneesNuit, texteDepuis } from './rapport-nuit.mjs';
|
||||
import { diagnosticPv, etatCellules, productionJour, chargeSolaire, bilanNuit, etatReseau, importJour, minuitLocal, COMPTEURS_IMPORT, COMPTEUR_EDF, consoJour, COMPTEURS_CONSO } from './diagnostics-agent.mjs';
|
||||
import { diagnosticPv, etatCellules, productionJour, chargeSolaire, bilanNuit, etatReseau, importJour, minuitLocal, COMPTEURS_IMPORT, COMPTEUR_EDF, consoJour, COMPTEURS_CONSO, projectionSoir } from './diagnostics-agent.mjs';
|
||||
|
||||
const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
||||
const ONCE = process.argv.includes('--once');
|
||||
@@ -1862,6 +1862,13 @@ async function publierDiagnosticPv(st) {
|
||||
await publierImportJour(st).catch((e) => {
|
||||
console.error(`import du jour : ${e.message}`); return 0;
|
||||
});
|
||||
// Projection du SOC au coucher du soleil : « indetermine » tant que la
|
||||
// prevision solaire n'est pas corrigee (decision du proprietaire, 27/09).
|
||||
const pj = projectionSoir(st);
|
||||
await publierCapteur('sensor.evcs_batterie_projection_soir', pj.etat, {
|
||||
friendly_name: 'EVCS — batterie attendue au coucher du soleil', icon: 'mdi:battery-clock',
|
||||
...pj.attributs, calcule_a: new Date().toISOString(),
|
||||
});
|
||||
// Raccordement reseau : contacteur ouvert = import nul, pas une panne (26/09).
|
||||
const rr = etatReseau(st);
|
||||
await publierCapteur('sensor.evcs_reseau', rr.etat, {
|
||||
|
||||
Reference in New Issue
Block a user