Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions packages/modules/vehicles/vwid/libeuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -703,8 +703,8 @@ async def async_eudaThread(self, username: str, password: str, vin: str):
euda.client[username] = EudaApiClient(session, username, password, brand)
_k = str(euda.client.keys())
_LOGGER.info(f"libeuda.Thread client: euda.client.keys={_k}")
meta = None

meta = None
while meta is None:
try:
meta = await euda.client[username].async_get_metadata(vin)
Expand Down Expand Up @@ -747,7 +747,9 @@ async def async_eudaThread(self, username: str, password: str, vin: str):

if status:
_Data = _data['Data']
soc = get_field_value_by_key(_Data, 'f89ed652-d104-3fa6-b7e2-ab7543309e7b')
soc = get_field_value_by_key(_Data, 'ae0294b4-1286-3e98-a818-1485b8d88430')
if soc is None:
soc = get_field_value_by_key(_Data, 'f89ed652-d104-3fa6-b7e2-ab7543309e7b')
if soc is None:
soc = get_field_value_by_key(_Data, '506cb83e-f99f-3af3-bbeb-0429b69a78d9')
if soc is None:
Expand Down Expand Up @@ -895,7 +897,7 @@ async def get_status(self,
# _LOGGER.info(f"get_status: publish soc_timestamp as 0: topic: {topic}, message: {ep0}")
# Pub().pub(topic, ep0)

return int(soc), float(range), int(ts), tsxx, float(odometer)
return float(soc), float(range), float(ts), tsxx, float(odometer)
except Exception as e:
_LOGGER.exception(f"get_status failed 0, exception={e}")
# if exception is a SOCERR reraise it, otherwise raise general SOCERR-00
Expand Down
Loading