Add charge start option delayed#1988
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1988 +/- ##
==========================================
+ Coverage 86.79% 87.28% +0.48%
==========================================
Files 34 34
Lines 2143 2312 +169
Branches 243 276 +33
==========================================
+ Hits 1860 2018 +158
- Misses 200 206 +6
- Partials 83 88 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Removed type check for `when` variable in delayed mode as variable is declared with expected type already.
epenet
left a comment
There was a problem hiding this comment.
Apologies for the delay in coming back to you
Please address the comments above
| "actions/charge-start-option-delayed": EndpointDefinition( | ||
| "/kcm/v1/vehicles/{vin}/charge/start", mode="kcm-option-delayed" | ||
| ), |
There was a problem hiding this comment.
Once #2011 is merged, please use key "actions/charge-start" and mode "kcm"
| "actions/charge-start-option-delayed": EndpointDefinition( | |
| "/kcm/v1/vehicles/{vin}/charge/start", mode="kcm-option-delayed" | |
| ), | |
| "actions/charge-start": EndpointDefinition( | |
| "/kcm/v1/vehicles/{vin}/charge/start", mode="kcm" | |
| ), |
| }, | ||
| "XCB1VE": { # MEGANE E-TECH | ||
| "actions/charge-start": _DEFAULT_ENDPOINTS["actions/charge-start"], | ||
| "actions/charge-start": _KCM_ENDPOINTS["actions/charge-start-option-delayed"], |
There was a problem hiding this comment.
Once #2011 is merged, please use key "actions/charge-start"
| "actions/charge-start": _KCM_ENDPOINTS["actions/charge-start-option-delayed"], | |
| "actions/charge-start": _KCM_ENDPOINTS["actions/charge-start"], |
| }, | ||
| } | ||
| } | ||
| else: |
There was a problem hiding this comment.
Once #2011 is merged, please avoid using "else" for multiple endpoints.
Instead please check the mode explicitly and duplicate the json creation to avoid future conflicts
| elif endpoint_definition.mode == "kcm": |
|
Closed in favour of #2010 |
Add the option to specify the startDateTime for the charge/start endpoint to mimic setting the Delayed Charging Mode. The optional parameter can be used when setting the below endpoint definition in models.py
This will also be the basis for a new API version for the HA Renault Integration to add the Start Charge action with the optional start parameter.
I opened issue #1987 for any additional discussion.