Skip to content

Commit c357b8c

Browse files
Document more renault 5 endpoints (#1625)
* mark several endpoints for renault 5 * truncate to appease linter * update snapshots
1 parent fd4ef7a commit c357b8c

3 files changed

Lines changed: 30 additions & 8 deletions

File tree

src/renault_api/kamereon/models.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,22 @@ class EndpointDefinition:
149149

150150
_VEHICLE_ENDPOINTS: dict[str, dict[str, Optional[EndpointDefinition]]] = {
151151
"R5E1VE": { # Renault 5 E-TECH
152+
"actions/horn-start": _DEFAULT_ENDPOINTS["actions/horn-start"],
153+
"actions/hvac-start": _DEFAULT_ENDPOINTS["actions/hvac-start"],
154+
"actions/lights-start": _DEFAULT_ENDPOINTS["actions/lights-start"],
155+
"battery-status": _DEFAULT_ENDPOINTS["battery-status"],
156+
"charge-history": None, # Reason: "you should not be there..."
157+
"charge-mode": None, # Reason: The access is forbidden
152158
"charge-schedule": _KCM_ENDPOINTS["charge-schedule"],
159+
"charges": _DEFAULT_ENDPOINTS["charges"],
160+
"cockpit": _DEFAULT_ENDPOINTS["cockpit"],
161+
"hvac-settings": _DEFAULT_ENDPOINTS["hvac-settings"],
162+
"hvac-status": _DEFAULT_ENDPOINTS["hvac-status"],
163+
"location": _DEFAULT_ENDPOINTS["location"],
164+
"lock-status": None, # Reason: 404
165+
"pressure": None, # Reason: 404
166+
"res-state": None, # Reason: The access is forbidden
167+
"soc-levels": _DEFAULT_ENDPOINTS["soc-levels"],
153168
},
154169
"X071VE": { # TWINGO III
155170
"res-state": None, # not supported

tests/__snapshots__/test_renault_vehicle.ambr

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,22 @@
142142
# ---
143143
# name: test_get_endpoints[tests/fixtures/kamereon/vehicles/renault_5.1.json]
144144
dict({
145+
'actions/horn-start': EndpointDefinition(endpoint='/kca/car-adapter/v1/cars/{vin}/actions/horn-lights', mode='default'),
146+
'actions/hvac-start': EndpointDefinition(endpoint='/kca/car-adapter/v1/cars/{vin}/actions/hvac-start', mode='default'),
147+
'actions/lights-start': EndpointDefinition(endpoint='/kca/car-adapter/v1/cars/{vin}/actions/horn-lights', mode='default'),
148+
'battery-status': EndpointDefinition(endpoint='/kca/car-adapter/v2/cars/{vin}/battery-status', mode='default'),
149+
'charge-history': None,
150+
'charge-mode': None,
145151
'charge-schedule': EndpointDefinition(endpoint='/kcm/v1/vehicles/{vin}/ev/settings', mode='kcm'),
152+
'charges': EndpointDefinition(endpoint='/kca/car-adapter/v1/cars/{vin}/charges', mode='default'),
153+
'cockpit': EndpointDefinition(endpoint='/kca/car-adapter/v1/cars/{vin}/cockpit', mode='default'),
154+
'hvac-settings': EndpointDefinition(endpoint='/kca/car-adapter/v1/cars/{vin}/hvac-settings', mode='default'),
155+
'hvac-status': EndpointDefinition(endpoint='/kca/car-adapter/v1/cars/{vin}/hvac-status', mode='default'),
156+
'location': EndpointDefinition(endpoint='/kca/car-adapter/v1/cars/{vin}/location', mode='default'),
157+
'lock-status': None,
158+
'pressure': None,
159+
'res-state': None,
160+
'soc-levels': EndpointDefinition(endpoint='/kcm/v1/vehicles/{vin}/ev/soc-levels', mode='default'),
146161
})
147162
# ---
148163
# name: test_get_endpoints[tests/fixtures/kamereon/vehicles/spring.1.json]

tests/cli/__snapshots__/test_vehicle.ambr

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -208,20 +208,12 @@
208208
Range estimate 128 km
209209
Plug state PlugState.UNPLUGGED
210210
Charging state ChargeState.NOT_IN_CHARGE
211-
Charge mode always
212211
Total mileage 49114.27 km
213212
GPS Latitude 48.1234567
214213
GPS Longitude 11.1234567
215214
GPS last updated 2020-02-18 17:58:38
216-
Lock status locked
217-
Lock last updated 2022-02-02 14:51:13
218-
Engine state Stopped, ready for RES
219215
HVAC status off
220216
External temperature 8.0 °C
221-
Front left pressure 2460 bar
222-
Front right pressure 2730 bar
223-
Rear left pressure 2790 bar
224-
Rear right pressure 2790 bar
225217
-------------------- -------------------------
226218

227219
'''

0 commit comments

Comments
 (0)