Skip to content

Energy recalc date and multi select - #23

Open
Terdious wants to merge 58 commits into
energy-monitoring-tasmota-and-otherfrom
energy-recalc-date-and-multi-select
Open

Energy recalc date and multi select#23
Terdious wants to merge 58 commits into
energy-monitoring-tasmota-and-otherfrom
energy-recalc-date-and-multi-select

Conversation

@Terdious

Copy link
Copy Markdown
Owner

Pull Request check-list

To ensure your Pull Request can be accepted as fast as possible, make sure to review and check all of these items:

  • If your changes affects code, did your write the tests?
  • Are tests passing? (npm test on both front/server)
  • Is the linter passing? (npm run eslint on both front/server)
  • Did you run prettier? (npm run prettier on both front/server)
  • If you are adding a new features/services, did you run integration comparator? (npm run compare-translations on front)
  • Did you test this pull request in real life? With real devices? If this development is a big feature or a new service, we recommend that you provide a Docker image to the community (forum) for testing before merging.
  • If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code)
  • If you are adding a new features/services which needs explanation, did you modify the user documentation? See the GitHub repo and the website.
  • Did you add fake requests data for the demo mode (front/src/config/demo.js) so that the demo website is working without a backend? (if needed) See https://demo.gladysassistant.com.

NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.

Description of change

Please provide a description of the change here. It's always best with screenshots, so don't hesitate to add some!

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Dec 19, 2025

Copy link
Copy Markdown

Deploying terdious-news-charts-and-expand with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9c5c75a
Status: ✅  Deploy successful!
Preview URL: https://48e3bf60.terdious-news-charts-and-expand.pages.dev
Branch Preview URL: https://separate-task-logs-pr.terdious-news-charts-and-expand.pages.dev

View logs

…ed features

- Updated internationalization files (de.json, en.json, fr.json) to include new keys for calculating consumption and cost from selected features.
- Enhanced EnergyMonitoring component to allow users to select features for recalculation, including UI updates for feature selection and error handling.
- Implemented backend changes to support feature selection in energy monitoring calculations, including job data handling and logging.
- Modified job wrapper to build job data based on selected features for both consumption and cost calculations.
- Added validation and logging for feature selectors in energy monitoring calculations.
- Updated JobList component to enhance device feature display logic.
- Modified job data schema to ensure features are required for devices.
- Cleaned up energy monitoring controller by removing unnecessary logger calls.
- Refactored calculateConsumptionFromIndex and calculateConsumptionFromIndexFromBeginning functions for better clarity and performance.
- Improved calculateCostFrom and calculateCostFromBeginning functions to streamline feature selector handling and job ID resolution.
- Enhanced job data building logic to ensure accurate device and feature identification.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Dec 19, 2025

Copy link
Copy Markdown

Deploying terdious-add-binary-chart with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9c5c75a
Status: ✅  Deploy successful!
Preview URL: https://e6ab5ce3.terdious-add-binary-chart.pages.dev
Branch Preview URL: https://separate-task-logs-pr.terdious-add-binary-chart.pages.dev

View logs

@Terdious
Terdious force-pushed the energy-recalc-date-and-multi-select branch from 51f1c6a to 0ec40eb Compare December 19, 2025 09:25
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Dec 19, 2025

Copy link
Copy Markdown

Deploying terdious-add-choice-number-col with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9c5c75a
Status: ✅  Deploy successful!
Preview URL: https://9b939816.terdious-add-choice-number-col.pages.dev
Branch Preview URL: https://separate-task-logs-pr.terdious-add-choice-number-col.pages.dev

View logs

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Dec 19, 2025

Copy link
Copy Markdown

Deploying terdious-binary-and-columns-dashboard with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9c5c75a
Status: ✅  Deploy successful!
Preview URL: https://0b565ae7.terdious-binary-and-columns-dashboard.pages.dev
Branch Preview URL: https://separate-task-logs-pr.terdious-binary-and-columns-dashboard.pages.dev

View logs

…lecteurs multiples et gérer les cas limites
…rs manquants dans le calcul de la consommation
…ériphérique et corriger le contexte dans les tests de construction des données de travail
… assertions dans les tests de consommation et de coût
Terdious and others added 30 commits December 20, 2025 18:26
…rove job handling

- Implemented `calculateCostRange` function to calculate energy monitoring cost over a specified date range.
- Updated `calculateCostFromYesterday` to utilize a new job data builder function.
- Enhanced `EnergyMonitoringHandler` to include new job types for cost and consumption calculations over ranges.
- Added unit tests for the new `calculateCostRange` and `calculateConsumptionFromIndexRange` functionalities.
- Refactored existing tests to ensure proper parameter handling and job ID propagation.
- Updated constants to include new job types for range calculations.
…tion

test(job): add tests for job.wrapper with buildJobData option

test(energy-monitoring): add tests for handling invalid dates and processing devices in calculateConsumptionFromIndexRange

test(energy-monitoring): add tests for building job data for thirty-minute consumption and cost windows

test(energy-monitoring): enhance tests for calculating cost from yesterday with job data building
…t refactoriser l'importation des données de coût
…nt le type de job

feat(tests): améliorer la gestion des erreurs dans les tests de consommation d'énergie
…e création de job

test(energy-monitoring): simplifier la gestion des erreurs pour les dates invalides
…to energy-recalc-date-and-multi-select"

This reverts commit 729f553, reversing
changes made to 3ec9277.
…alités d'énergie par catégorie""

This reverts commit c214545.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant