prohand
February 18, 2026, 8:13am
1
Hello everyone,
On the Enedis integration, I noticed that in the month of February some days the cost was zero:
Whereas the consumption is present:
I won’t rerun the cost calculation for now so I can have data to diagnose.
But is anyone encountering the same problem?
We had encountered an issue of a difference between Enedis and Lixee on this topic but I don’t know if it’s related as well:
https://community.gladysassistant.com/t/valeur-differente-entre-lixee-et-enedis/9905
I don’t seem to have a problem outside the Enedis integration this time
mutmut
February 18, 2026, 9:24pm
2
Personally, I’m experiencing an interruption in cost calculations for a few days after February 1st due to the pricing change.
But I’m eagerly awaiting the integration of @Terdious ’s development for the custom calculation (development tested, proven and validated by me ).
I have the same issue!
I think there are days when Enedis provides the data late, and so the calculation has already run.
Currently, we assume that at 11 a.m. Enedis has sent the previous day’s data, but on some days it’s probably later.
Maybe we should run another round of calculations later each day to be safe!
prohand
February 19, 2026, 8:11am
4
Yes, I do think we should indeed rerun an automatic computation layer later, like at 23:59
Hello,
I’m reviving this topic because I notice that I still have the problem with the Enedis integration:
Thanks for the nudge @prohand ! I had already added a recalculation, but apparently it wasn’t enough.
This time, I’ve implemented something more robust: after each synchronization with Enedis, if new data is retrieved, the consumption is automatically recalculated. That way, no more gaps in the racket!
master ← cursor/recalculate-after-enedis-sync-273d
ouvert 09:14AM - 20 Jul 26 UTC
### Pull Request check-list
- [x] If your changes affect the code, did you writ… e the tests?
- [x] Are server tests passing with coverage? (`cd server && npm run coverage`) — Codecov requires **100% coverage on lines changed in this PR**
- [ ] Did Cypress E2E tests pass? (`npm run cypress:run` from repo root, if UI changed)
- [x] Is the linter passing? (`npm run eslint` on both front/server)
- [x] Did you run prettier? (`npm run prettier` on both front/server)
### Description of change
This PR recalculates energy costs after each Enedis sync while preserving ordering and concurrency guarantees.
Implementation details:
- await every Enedis historical-state write before recalculation
- track paginated Enedis sync date ranges
- aggregate all usage points and run one recalculation from the global earliest date
- serialize post-sync calculations through the energy-monitoring queue
- interpret date-only Enedis values at midnight in the configured system timezone
- avoid reusing Enedis job progress for the nested cost calculation
- use chronological multi-page test fixtures
- cover persistence ordering, pagination, no-data behavior, unavailable energy-monitoring fallback, multiple usage points, load-curve sync, string and Date inputs, timezone conversion, queue serialization, and job progress behavior
### Validation
- `npm run prettier`
- `npm run prettier-check`
- `npm run eslint` (0 errors; existing warnings only)
- CodeRabbit-requested targeted tests: 14 passing
- `npm run coverage`: 4329 passing
- changed Enedis sync file: 100% line coverage
- new queued calculation file: 100% line/branch/function coverage
<div><a href="https://cursor.com/agents/bc-82693d93-0513-49e0-aa43-8c7b449d273d"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-82693d93-0513-49e0-aa43-8c7b449d273d"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div>
## Summary by CodeRabbit
* **New Features**
* Added date-based energy cost recalculation with timezone-aware handling.
* Enhanced Enedis synchronization to track the first/last synced date ranges.
* Historical readings are now persisted directly during synchronization.
* Energy costs are recalculated from the earliest newly synced data.
* **Bug Fixes**
* Prevented job progress updates when no job is associated with a calculation.
* Skipped cost recalculation when no new data was synchronized.
* When energy monitoring is unavailable, recalculation is safely skipped with a warning.
This will be included in the next version of Gladys!
The fix is available in Gladys Assistant 4.84!
Hello everyone !
I’m really excited to release tonight a version that, I think, will really change the pace of the project’s evolution.
External integrations are finally coming to Gladys! They will allow us to enrich the list of compatible devices and services much faster, while allowing everyone to develop and share their own integrations.
I explain everything in this article