pycupra 0.0.8__tar.gz → 0.0.9__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.
- {pycupra-0.0.8/pycupra.egg-info → pycupra-0.0.9}/PKG-INFO +1 -1
- {pycupra-0.0.8 → pycupra-0.0.9}/pycupra/__version__.py +1 -1
- {pycupra-0.0.8 → pycupra-0.0.9}/pycupra/vehicle.py +27 -4
- {pycupra-0.0.8 → pycupra-0.0.9/pycupra.egg-info}/PKG-INFO +1 -1
- {pycupra-0.0.8 → pycupra-0.0.9}/.gitignore +0 -0
- {pycupra-0.0.8 → pycupra-0.0.9}/LICENSE +0 -0
- {pycupra-0.0.8 → pycupra-0.0.9}/README.md +0 -0
- {pycupra-0.0.8 → pycupra-0.0.9}/cupra_credentials.json.demo +0 -0
- {pycupra-0.0.8 → pycupra-0.0.9}/example/PyCupra.py +0 -0
- {pycupra-0.0.8 → pycupra-0.0.9}/pycupra/__init__.py +0 -0
- {pycupra-0.0.8 → pycupra-0.0.9}/pycupra/connection.py +0 -0
- {pycupra-0.0.8 → pycupra-0.0.9}/pycupra/const.py +0 -0
- {pycupra-0.0.8 → pycupra-0.0.9}/pycupra/dashboard.py +0 -0
- {pycupra-0.0.8 → pycupra-0.0.9}/pycupra/exceptions.py +0 -0
- {pycupra-0.0.8 → pycupra-0.0.9}/pycupra/utilities.py +0 -0
- {pycupra-0.0.8 → pycupra-0.0.9}/pycupra.egg-info/SOURCES.txt +0 -0
- {pycupra-0.0.8 → pycupra-0.0.9}/pycupra.egg-info/dependency_links.txt +0 -0
- {pycupra-0.0.8 → pycupra-0.0.9}/pycupra.egg-info/requires.txt +0 -0
- {pycupra-0.0.8 → pycupra-0.0.9}/pycupra.egg-info/top_level.txt +0 -0
- {pycupra-0.0.8 → pycupra-0.0.9}/requirements.txt +0 -0
- {pycupra-0.0.8 → pycupra-0.0.9}/setup.cfg +0 -0
- {pycupra-0.0.8 → pycupra-0.0.9}/setup.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: pycupra
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.9
|
4
4
|
Summary: A library to read and send vehicle data via Cupra/Seat portal using the same API calls as the MyCupra/MySeat mobile app.
|
5
5
|
Home-page: https://github.com/WulfgarW/pycupra
|
6
6
|
Author: WulfgarW
|
@@ -107,7 +107,8 @@ class Vehicle:
|
|
107
107
|
self._relevantCapabilties[id].update(data)
|
108
108
|
|
109
109
|
|
110
|
-
await self.get_trip_statistic()
|
110
|
+
#await self.get_trip_statistic() # in full update
|
111
|
+
|
111
112
|
# Get URLs for model image
|
112
113
|
self._modelimages = await self.get_modelimageurl()
|
113
114
|
|
@@ -132,6 +133,7 @@ class Vehicle:
|
|
132
133
|
await asyncio.gather(
|
133
134
|
self.get_charger(),
|
134
135
|
self.get_basiccardata(),
|
136
|
+
self.get_statusreport(),
|
135
137
|
return_exceptions=True
|
136
138
|
)
|
137
139
|
|
@@ -146,9 +148,9 @@ class Vehicle:
|
|
146
148
|
await asyncio.gather(
|
147
149
|
self.get_preheater(),
|
148
150
|
self.get_climater(),
|
149
|
-
|
151
|
+
self.get_trip_statistic(),
|
150
152
|
self.get_position(),
|
151
|
-
self.
|
153
|
+
self.get_maintenance(),
|
152
154
|
self.get_vehicleHealthWarnings(),
|
153
155
|
self.get_departure_timers(),
|
154
156
|
self.get_departure_profiles(),
|
@@ -251,6 +253,9 @@ class Vehicle:
|
|
251
253
|
self._states.update(data)
|
252
254
|
else:
|
253
255
|
_LOGGER.debug('Could not fetch status report')
|
256
|
+
|
257
|
+
async def get_maintenance(self):
|
258
|
+
"""Fetch maintenance data if function is enabled."""
|
254
259
|
if self._relevantCapabilties.get('vehicleHealthInspection', {}).get('active', False):
|
255
260
|
data = await self._connection.getMaintenance(self.vin, self._apibase)
|
256
261
|
if data:
|
@@ -1006,7 +1011,25 @@ class Vehicle:
|
|
1006
1011
|
'status': response.get('state', 'Unknown'),
|
1007
1012
|
'id': response.get('id', 0),
|
1008
1013
|
}
|
1009
|
-
|
1014
|
+
# Update the lock data and check, if they have changed as expected
|
1015
|
+
retry = 0
|
1016
|
+
actionSuccessful = False
|
1017
|
+
while not actionSuccessful and retry < 2:
|
1018
|
+
await asyncio.sleep(15)
|
1019
|
+
await self.get_statusreport()
|
1020
|
+
if action == 'lock':
|
1021
|
+
if self.door_locked:
|
1022
|
+
actionSuccessful = True
|
1023
|
+
else:
|
1024
|
+
if not self.door_locked:
|
1025
|
+
actionSuccessful = True
|
1026
|
+
retry = retry +1
|
1027
|
+
if actionSuccessful:
|
1028
|
+
_LOGGER.debug('POST request for lock/unlock successful. New status as expected.')
|
1029
|
+
self._requests.get('lock', {}).pop('id')
|
1030
|
+
return True
|
1031
|
+
_LOGGER.error('Response to POST request seemed successful but the lock status did not change as expected.')
|
1032
|
+
return False
|
1010
1033
|
except (SeatInvalidRequestException, SeatException):
|
1011
1034
|
raise
|
1012
1035
|
except Exception as error:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: pycupra
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.9
|
4
4
|
Summary: A library to read and send vehicle data via Cupra/Seat portal using the same API calls as the MyCupra/MySeat mobile app.
|
5
5
|
Home-page: https://github.com/WulfgarW/pycupra
|
6
6
|
Author: WulfgarW
|
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
|