renault-api 0.6.2__tar.gz → 0.6.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {renault_api-0.6.2 → renault_api-0.6.3}/PKG-INFO +1 -1
- {renault_api-0.6.2 → renault_api-0.6.3}/pyproject.toml +4 -4
- {renault_api-0.6.2 → renault_api-0.6.3}/pyproject.toml.orig +4 -4
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/kamereon/models.py +28 -4
- {renault_api-0.6.2 → renault_api-0.6.3}/LICENSE.rst +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/README.rst +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/__init__.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/cli/__init__.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/cli/__main__.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/cli/charge/__init__.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/cli/charge/commands.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/cli/charge/control.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/cli/charge/history.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/cli/charge/schedule.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/cli/charge/soc_levels.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/cli/helpers.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/cli/hvac/__init__.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/cli/hvac/commands.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/cli/hvac/control.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/cli/hvac/history.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/cli/renault_account.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/cli/renault_client.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/cli/renault_settings.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/cli/renault_vehicle.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/const.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/credential.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/credential_store.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/exceptions.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/gigya/__init__.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/gigya/enums.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/gigya/exceptions.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/gigya/models.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/gigya/schemas.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/helpers.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/kamereon/__init__.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/kamereon/enums.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/kamereon/exceptions.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/kamereon/helpers.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/kamereon/schemas.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/models.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/py.typed +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/renault_account.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/renault_client.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/renault_session.py +0 -0
- {renault_api-0.6.2 → renault_api-0.6.3}/src/renault_api/renault_vehicle.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "renault-api"
|
|
3
|
-
version = "0.6.
|
|
3
|
+
version = "0.6.3"
|
|
4
4
|
description = "Renault API"
|
|
5
5
|
license = "MIT"
|
|
6
6
|
license-files = ["LICENSE.rst"]
|
|
@@ -46,12 +46,12 @@ dev = [
|
|
|
46
46
|
"coverage[toml]==7.17.0",
|
|
47
47
|
"pre-commit-hooks==6.0.0",
|
|
48
48
|
"prek==0.5.7",
|
|
49
|
-
"pytest==9.
|
|
49
|
+
"pytest==9.2.0",
|
|
50
50
|
"pytest-asyncio==1.4.1",
|
|
51
51
|
"pytest-cov==7.1.0",
|
|
52
|
-
"ruff==0.17.
|
|
52
|
+
"ruff==0.17.3",
|
|
53
53
|
"syrupy==6.1.1",
|
|
54
|
-
"ty==0.0.
|
|
54
|
+
"ty==0.0.93",
|
|
55
55
|
"yamllint==1.38.0",
|
|
56
56
|
"zizmor==1.31.1",
|
|
57
57
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "renault-api"
|
|
3
|
-
version = "0.6.
|
|
3
|
+
version = "0.6.3"
|
|
4
4
|
description = "Renault API"
|
|
5
5
|
authors = [{ name = "epenet" }]
|
|
6
6
|
license = "MIT"
|
|
@@ -46,12 +46,12 @@ dev = [
|
|
|
46
46
|
"coverage[toml]==7.17.0",
|
|
47
47
|
"pre-commit-hooks==6.0.0",
|
|
48
48
|
"prek==0.5.7",
|
|
49
|
-
"pytest==9.
|
|
49
|
+
"pytest==9.2.0",
|
|
50
50
|
"pytest-asyncio==1.4.1",
|
|
51
51
|
"pytest-cov==7.1.0",
|
|
52
|
-
"ruff==0.17.
|
|
52
|
+
"ruff==0.17.3",
|
|
53
53
|
"syrupy==6.1.1",
|
|
54
|
-
"ty==0.0.
|
|
54
|
+
"ty==0.0.93",
|
|
55
55
|
"yamllint==1.38.0",
|
|
56
56
|
"zizmor==1.31.1",
|
|
57
57
|
]
|
|
@@ -312,10 +312,24 @@ _VEHICLE_ENDPOINTS: dict[str, dict[str, EndpointDefinition | None]] = {
|
|
|
312
312
|
"soc-levels": _DEFAULT_ENDPOINTS["soc-levels"],
|
|
313
313
|
},
|
|
314
314
|
"X071VE": { # TWINGO III
|
|
315
|
+
"actions/charge-set-mode": _DEFAULT_ENDPOINTS["actions/charge-set-mode"],
|
|
316
|
+
"actions/charge-set-schedule": _DEFAULT_ENDPOINTS[
|
|
317
|
+
"actions/charge-set-schedule"
|
|
318
|
+
],
|
|
319
|
+
"actions/charge-start": _KCM_ENDPOINTS["actions/charge-start"],
|
|
320
|
+
"actions/charge-stop": None, # Not supported - use charger to stop
|
|
321
|
+
"actions/horn-start": None, # Reason: err.func.wired.forbidden
|
|
322
|
+
"actions/hvac-set-schedule": _DEFAULT_ENDPOINTS["actions/hvac-set-schedule"],
|
|
323
|
+
"actions/hvac-start": _DEFAULT_ENDPOINTS["actions/hvac-start"],
|
|
324
|
+
"actions/hvac-stop": None, # Not supported
|
|
325
|
+
"actions/lights-start": None, # Reason: err.func.wired.forbidden
|
|
326
|
+
"actions/refresh-location": _DEFAULT_ENDPOINTS["actions/refresh-location"],
|
|
327
|
+
"alerts": None, # Reason: "err.func.wired.not-found"
|
|
315
328
|
"battery-status": _DEFAULT_ENDPOINTS["battery-status"],
|
|
316
329
|
"charge-history": None, # Reason: "err.func.wired.not-found"
|
|
317
330
|
"charge-mode": None, # Reason: "err.func.vcps.ev.charge-mode.error"
|
|
318
331
|
"charge-schedule": None, # Reason: "err.func.vcps.ev.charge-schedule.error"
|
|
332
|
+
"charges": _DEFAULT_ENDPOINTS["charges"],
|
|
319
333
|
"charging-settings": _DEFAULT_ENDPOINTS["charging-settings"],
|
|
320
334
|
"cockpit": _DEFAULT_ENDPOINTS["cockpit"],
|
|
321
335
|
"hvac-history": None, # Reason: "err.func.wired.not-found"
|
|
@@ -327,6 +341,7 @@ _VEHICLE_ENDPOINTS: dict[str, dict[str, EndpointDefinition | None]] = {
|
|
|
327
341
|
"notification-settings": None, # Reason: "err.func.vcps.users-helper.get-notification-settings.error" # noqa: E501
|
|
328
342
|
"pressure": None, # Reason: "err.func.wired.notFound"
|
|
329
343
|
"res-state": None, # Reason: "err.func.wired.notFound"
|
|
344
|
+
"soc-levels": None, # Reason: "err.func.wired.forbidden"
|
|
330
345
|
},
|
|
331
346
|
"X101VE": { # ZOE phase 1
|
|
332
347
|
"actions/charge-set-schedule": _DEFAULT_ENDPOINTS[
|
|
@@ -767,6 +782,17 @@ _VEHICLE_ENDPOINTS: dict[str, dict[str, EndpointDefinition | None]] = {
|
|
|
767
782
|
|
|
768
783
|
_ALREADY_WARNED_VEHICLE: set[str] = set()
|
|
769
784
|
_ALREADY_WARNED_VEHICLE_ENDPOINT: set[str] = set()
|
|
785
|
+
_ALREADY_WARNED_ENUM_VALUE: set[str] = set()
|
|
786
|
+
|
|
787
|
+
|
|
788
|
+
def _log_unknown_enum_value(enum_name: str, value: Any) -> None:
|
|
789
|
+
"""Log an unknown enum value, as a warning only the first time."""
|
|
790
|
+
key = f"{enum_name}:{value}"
|
|
791
|
+
if key not in _ALREADY_WARNED_ENUM_VALUE:
|
|
792
|
+
_ALREADY_WARNED_ENUM_VALUE.add(key)
|
|
793
|
+
_LOGGER.warning("Unable to convert `%s` to %s.", value, enum_name)
|
|
794
|
+
else:
|
|
795
|
+
_LOGGER.debug("Unable to convert `%s` to %s.", value, enum_name)
|
|
770
796
|
|
|
771
797
|
|
|
772
798
|
def get_model_endpoints(
|
|
@@ -1114,7 +1140,7 @@ class KamereonVehicleBatteryStatusData(KamereonVehicleDataAttributes):
|
|
|
1114
1140
|
else None
|
|
1115
1141
|
)
|
|
1116
1142
|
except ValueError:
|
|
1117
|
-
|
|
1143
|
+
_log_unknown_enum_value("PlugState", self.plugStatus)
|
|
1118
1144
|
return None
|
|
1119
1145
|
|
|
1120
1146
|
def get_charging_status(self) -> enums.ChargeState | None:
|
|
@@ -1126,9 +1152,7 @@ class KamereonVehicleBatteryStatusData(KamereonVehicleDataAttributes):
|
|
|
1126
1152
|
else None
|
|
1127
1153
|
)
|
|
1128
1154
|
except ValueError:
|
|
1129
|
-
|
|
1130
|
-
"Unable to convert `%s` to ChargeState.", self.chargingStatus
|
|
1131
|
-
)
|
|
1155
|
+
_log_unknown_enum_value("ChargeState", self.chargingStatus)
|
|
1132
1156
|
return None
|
|
1133
1157
|
|
|
1134
1158
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|