carconnectivity-connector-seatcupra 0.2a5__py3-none-any.whl → 0.3__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: carconnectivity-connector-seatcupra
3
- Version: 0.2a5
3
+ Version: 0.3
4
4
  Summary: CarConnectivity connector for Seat and Cupra services
5
5
  Author: Till Steinbach
6
6
  License: MIT License
@@ -37,7 +37,7 @@ Classifier: Topic :: Software Development :: Libraries
37
37
  Requires-Python: >=3.9
38
38
  Description-Content-Type: text/markdown
39
39
  License-File: LICENSE
40
- Requires-Dist: carconnectivity>=0.5a4
40
+ Requires-Dist: carconnectivity>=0.6
41
41
  Requires-Dist: oauthlib~=3.2.2
42
42
  Requires-Dist: requests~=2.32.3
43
43
  Requires-Dist: jwt~=1.3.1
@@ -1,11 +1,11 @@
1
- carconnectivity_connector_seatcupra-0.2a5.dist-info/licenses/LICENSE,sha256=PIwI1alwDyOfvEQHdGCm2u9uf_mGE8030xZDfun0xTo,1071
1
+ carconnectivity_connector_seatcupra-0.3.dist-info/licenses/LICENSE,sha256=PIwI1alwDyOfvEQHdGCm2u9uf_mGE8030xZDfun0xTo,1071
2
2
  carconnectivity_connectors/seatcupra/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- carconnectivity_connectors/seatcupra/_version.py,sha256=gBBVklnLddS1IBpDXSdeUYTr2XaGy46iAMvj39V3VYo,514
3
+ carconnectivity_connectors/seatcupra/_version.py,sha256=hptOGIBLOnpzA-fkbjoP65wPqWhg_6jCYYIUObQw6xc,506
4
4
  carconnectivity_connectors/seatcupra/capability.py,sha256=936V06hOX8AuAMxL_S9wVyVa36Xw1bo9081X0xf5f94,5064
5
5
  carconnectivity_connectors/seatcupra/charging.py,sha256=mayvseay5x2r2qjWqol0ijlgoBL2L2A0A96T44FOiHg,4076
6
6
  carconnectivity_connectors/seatcupra/climatization.py,sha256=0xxWlxrheAPzkVT8WRQtbm6ExZmVdgW7lUdOXyS_qWY,1695
7
- carconnectivity_connectors/seatcupra/command_impl.py,sha256=LmBOCWGZPfJCG_4-5449xvO6NAvnPDsAWEBKlsG4WoI,3051
8
- carconnectivity_connectors/seatcupra/connector.py,sha256=_8Lvg1yqHHbH4mkhThwq0KZZL64rzKoFYurQCQurqY4,130482
7
+ carconnectivity_connectors/seatcupra/command_impl.py,sha256=wUmf4IRo4HxzeiS6LKfQzUZBwPO6Gm8GQmVJM9sH1Tk,3226
8
+ carconnectivity_connectors/seatcupra/connector.py,sha256=5bLClhgEyL1R12Ooa3UanRNx0Ke5yrvYp_5qF82hnD4,130762
9
9
  carconnectivity_connectors/seatcupra/vehicle.py,sha256=LHkAlVD_C8xOX81wCGFZbZqyhctpKx-CN0T3NZJ2jFk,3946
10
10
  carconnectivity_connectors/seatcupra/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  carconnectivity_connectors/seatcupra/auth/auth_util.py,sha256=Y81h8fGOMSMgPtE4wI_TI9WgE_s43uaPjRLBBINhj4g,4433
@@ -14,8 +14,8 @@ carconnectivity_connectors/seatcupra/auth/openid_session.py,sha256=pGdTSt2zMtPWD
14
14
  carconnectivity_connectors/seatcupra/auth/session_manager.py,sha256=ZIDvC848T3fy6PgGqCl8A2SzaNhu2YG19Xam5kgp7SA,5635
15
15
  carconnectivity_connectors/seatcupra/auth/vw_web_session.py,sha256=CcI6m68IyRs6WsMDu-IsW3Dj85vyGiMmxvFqNETMHO0,10929
16
16
  carconnectivity_connectors/seatcupra/auth/helpers/blacklist_retry.py,sha256=f3wsiY5bpHDBxp7Va1Mv9nKJ4u3qnCHZZmDu78_AhMk,1251
17
- carconnectivity_connectors/seatcupra/ui/connector_ui.py,sha256=SNYnlcGJpbWhuLiIHD2l6H9IfSiMz3IgmvXsdossDnE,1412
18
- carconnectivity_connector_seatcupra-0.2a5.dist-info/METADATA,sha256=GNrJzfeFo_OxXxnlEzUuZWQZlOrczneqpa-tD_iqPRk,5495
19
- carconnectivity_connector_seatcupra-0.2a5.dist-info/WHEEL,sha256=tTnHoFhvKQHCh4jz3yCn0WPTYIy7wXx3CJtJ7SJGV7c,91
20
- carconnectivity_connector_seatcupra-0.2a5.dist-info/top_level.txt,sha256=KqA8GviZsDH4PtmnwSQsz0HB_w-TWkeEHLIRNo5dTaI,27
21
- carconnectivity_connector_seatcupra-0.2a5.dist-info/RECORD,,
17
+ carconnectivity_connectors/seatcupra/ui/connector_ui.py,sha256=UXDWnMAyTrm0UReTP2WamorrPE5kAJ5oxOjCp-MrZ-c,1414
18
+ carconnectivity_connector_seatcupra-0.3.dist-info/METADATA,sha256=TAUEL6c8a4npLNiH2ltogQLIBT6D4LysUhLU3wxbHc0,5491
19
+ carconnectivity_connector_seatcupra-0.3.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
20
+ carconnectivity_connector_seatcupra-0.3.dist-info/top_level.txt,sha256=KqA8GviZsDH4PtmnwSQsz0HB_w-TWkeEHLIRNo5dTaI,27
21
+ carconnectivity_connector_seatcupra-0.3.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (77.0.1)
2
+ Generator: setuptools (78.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '0.2a5'
21
- __version_tuple__ = version_tuple = (0, 2, 'a5')
20
+ __version__ = version = '0.3'
21
+ __version_tuple__ = version_tuple = (0, 3)
@@ -33,7 +33,11 @@ class SpinCommand(GenericCommand):
33
33
  def value(self, new_value: Optional[Union[str, Dict]]) -> None:
34
34
  # Execute early hooks before parsing the value
35
35
  new_value = self._execute_on_set_hook(new_value, early_hook=True)
36
- if isinstance(new_value, str):
36
+ if isinstance(new_value, SpinCommand.Command):
37
+ newvalue_dict = {}
38
+ newvalue_dict['command'] = new_value
39
+ new_value = newvalue_dict
40
+ elif isinstance(new_value, str):
37
41
  parser = ThrowingArgumentParser(prog='', add_help=False, exit_on_error=False)
38
42
  parser.add_argument('command', help='Command to execute', type=SpinCommand.Command,
39
43
  choices=list(SpinCommand.Command))
@@ -336,6 +336,9 @@ class Connector(BaseConnector):
336
336
  if 'vehicles' in data and data['vehicles'] is not None:
337
337
  for vehicle_dict in data['vehicles']:
338
338
  if 'vin' in vehicle_dict and vehicle_dict['vin'] is not None:
339
+ if vehicle_dict['vin'] in self.active_config['hide_vins']:
340
+ LOG.info('Vehicle %s filtered out due to configuration', vehicle_dict['vin'])
341
+ continue
339
342
  vin: str = vehicle_dict['vin']
340
343
  seen_vehicle_vins.add(vin)
341
344
  vehicle: Optional[GenericVehicle] = garage.get_vehicle(vin) # pyright: ignore[reportAssignmentType]
@@ -1516,7 +1519,7 @@ class Connector(BaseConnector):
1516
1519
 
1517
1520
  try:
1518
1521
  command_response: requests.Response = self.session.post(url, data='{}', allow_redirects=True)
1519
- if command_response.status_code not in (requests.codes['ok'], requests.codes['no_content']):
1522
+ if command_response.status_code not in (requests.codes['ok'], requests.codes['no_content'], requests.codes['created']):
1520
1523
  LOG.error('Could not execute wake command (%s: %s)', command_response.status_code, command_response.text)
1521
1524
  raise CommandError(f'Could not execute wake command ({command_response.status_code}: {command_response.text})')
1522
1525
  except requests.exceptions.ConnectionError as connection_error:
@@ -1565,7 +1568,7 @@ class Connector(BaseConnector):
1565
1568
  url = f'https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/{vin}/honk-and-flash'
1566
1569
  try:
1567
1570
  command_response: requests.Response = self.session.post(url, data=json.dumps(command_dict), allow_redirects=True)
1568
- if command_response.status_code not in (requests.codes['ok'], requests.codes['no_content']):
1571
+ if command_response.status_code not in (requests.codes['ok'], requests.codes['no_content'], requests.codes['created']):
1569
1572
  LOG.error('Could not execute honk or flash command (%s: %s)', command_response.status_code, command_response.text)
1570
1573
  raise CommandError(f'Could not execute honk or flash command ({command_response.status_code}: {command_response.text})')
1571
1574
  except requests.exceptions.ConnectionError as connection_error:
@@ -19,8 +19,8 @@ class ConnectorUI(BaseConnectorUI):
19
19
  A user interface class for the Seat/Cupra connector in the Car Connectivity application.
20
20
  """
21
21
  def __init__(self, connector: BaseConnector):
22
- blueprint: Optional[flask.Blueprint] = flask.Blueprint(name='seatcupra', import_name='carconnectivity-connector-seatcupra', url_prefix='/seatcupra',
23
- template_folder=os.path.dirname(__file__) + '/templates')
22
+ blueprint: Optional[flask.Blueprint] = flask.Blueprint(name=connector.id, import_name='carconnectivity-connector-seatcupra', url_prefix=f'/{connector.id}',
23
+ template_folder=os.path.dirname(__file__) + '/templates')
24
24
  super().__init__(connector, blueprint=blueprint)
25
25
 
26
26
  def get_nav_items(self) -> List[Dict[Literal['text', 'url', 'sublinks', 'divider'], Union[str, List]]]: