CJNE / ha-porscheconnect

Porsche Connect custom component for Home Assistant
MIT License
29 stars 12 forks source link

Retrying setup: 'chargingProfiles' #59

Closed willbeeching closed 2 years ago

willbeeching commented 2 years ago

Since the latest update it seems if you don't have an electric car chargingProfiles breaks the integration

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh self.data = await self._async_update_data() File "/config/custom_components/porscheconnect/__init__.py", line 188, in _async_update_data vdata = await self._update_data_for_vehicle(vehicle) File "/config/custom_components/porscheconnect/__init__.py", line 149, in _update_data_for_vehicle if vdata["chargingProfiles"] is not None: KeyError: 'chargingProfiles'

Hopefully it's an easy fix :)