Closed sonar98 closed 2 months ago
Please enable debug and provide the line which looks like "vin {vin}: received charging info: {response_text}"
which should be just before the error.
2024-09-22 22:37:33.969 DEBUG (MainThread) [myskoda.rest_api] vin XXXXXXXXXXXXXXXXXX: received charging info: {"isVehicleInSavedLocation":false,"status":{"chargingRateInKilometersPerHour":0.0,"chargePowerInKw":0.0,"remainingTimeToFullyChargedInMinutes":0,"battery":{"remainingCruisingRangeInMeters":208000,"stateOfChargeInPercent":48}},"settings":{"targetStateOfChargeInPercent":80,"preferredChargeMode":"MANUAL","availableChargeModes":["MANUAL"],"chargingCareMode":"ACTIVATED","autoUnlockPlugWhenCharged":"OFF","maxChargeCurrentAc":"MAXIMUM","batterySupport":"DISABLED"},"carCapturedTimestamp":"2024-09-22T15:34:14Z","errors":[{"type":"STATUS_OF_CHARGING_NOT_AVAILABLE","description":"Status of charging is not available."}]}
I tried reloading the integration when charging was started and then it worked.
And this version does not fix the other issue. After a while all sensors and switches are unavailable in HA. I will revert back to 1.2.4 for now.
Deze fout is ontstaan door een aangepaste integratie.
Logger: custom_components.myskoda.coordinator
Bron: helpers/update_coordinator.py:354
integratie: MySkoda (documentatie, problemen)
Eerst voorgekomen: 22 september 2024 om 23:48:25 (20 gebeurtenissen)
Laatst gelogd: 09:18:25
Unexpected error fetching myskoda data
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 354, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/myskoda/coordinator.py", line 65, in _async_update_data
vehicles = await self.myskoda.get_all_vehicles()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/myskoda/myskoda.py", line 208, in get_all_vehicles
vins = await self.list_vehicle_vins()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/myskoda/myskoda.py", line 176, in list_vehicle_vins
return await self.rest_api.list_vehicles()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/myskoda/rest_api.py", line 147, in list_vehicles
headers=await self._headers(),
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/myskoda/rest_api.py", line 153, in _headers
return {"authorization": f"Bearer {await self.idk_session.get_access_token(self.session)}"}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/myskoda/authorization.py", line 96, in get_access_token
await self.perform_refresh(session)
File "/usr/local/lib/python3.12/site-packages/myskoda/authorization.py", line 81, in perform_refresh
data = json.loads(await response.text())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
I see not everything made it into the prerelease indeed. Thanks for letting us know!
Closing, superseded by #28
Version 1.3.0 gives an error when starting.