Implement create_charge_schedule function#1981
Implement create_charge_schedule function#1981reneboer wants to merge 7 commits intohacf-fr:mainfrom
Conversation
Implemented the create_charge_schedule function to generate a charge schedule based on input settings, including day schedules.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1981 +/- ##
==========================================
+ Coverage 86.79% 86.93% +0.13%
==========================================
Files 34 34
Lines 2143 2150 +7
Branches 243 245 +2
==========================================
+ Hits 1860 1869 +9
+ Misses 200 198 -2
Partials 83 83 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Please add some tests for the helper, probably with parametrized input + snapshot comparison |
Add to test_renault_vehicle to simulate the set_charge_schedules when there is no current schedule and to simulate updating an existing schedule. This will trigger more helper functions to be used in tests and increase test coverage.
I was just working on that and uploaded an hour ago :-) |
|
Hi epinet, As FYI this is sort of the plan I have for all these updates. The two current PRs are to fix the issue that charge_set_schedule fails when the charging-settings endpoint returns an empty value for schedules. This happens when the charging mode is always or delayed. Then there is the basis for the charge_start action. Then I also plan a PR to add more attributed to the KamereonVehicleChargingSettingsData class. Then a PR to update the models.py definition for the Megane. I found that the KCA endpoints for charging-start and charge-schedule do not really work anymore. The KCM endoint do work reliably, so I will update to those. After that a PR to bump the version. After that I will do the Renault Integration. First the PR for version dependency and then the PR to add the start-charge action with an optional start date/time for the delayed charging. Lastly a PR for adding the additional attributes to the Charging Mode sensor. Please let me know if you are ok with this plan. |
|
Hi epinet, I hope we can get all the PRs done soon so I can use your integration again. |
Implemented the create_charge_schedule function to generate a charge schedule based on input settings, including day schedules as indicated in issue #1980