bimmerconnected / bimmer_connected

🚘 Library to query the status of your BMW or Mini from the ConnectedDrive portal
Apache License 2.0
362 stars 79 forks source link

Error when trigger AC #403

Closed licheng5625 closed 2 years ago

licheng5625 commented 2 years ago

Describe the issue

Error executing service: <ServiceCall bmw_connected_drive.activate_air_conditioning (c:785eb967ef7282bf60d48bd1c6c9d2fc): vin=Xxxxxxxxxxxxxxxxxxxxx>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1511, in catch_exceptions
    await coro_or_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1534, in _execute_service
    await self._hass.async_add_executor_job(handler.job.target, service_call)
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/bmw_connected_drive/__init__.py", line 254, in execute_service
    function_call()
  File "/usr/local/lib/python3.9/site-packages/bimmer_connected/remote_services.py", line 144, in trigger_remote_air_conditioning
    result = self._block_until_done(_Services.REMOTE_AIR_CONDITIONING, event_id)
  File "/usr/local/lib/python3.9/site-packages/bimmer_connected/remote_services.py", line 185, in _block_until_done
    status = self._get_remote_service_status(service, event_id)
  File "/usr/local/lib/python3.9/site-packages/bimmer_connected/remote_services.py", line 213, in _get_remote_service_status
    return RemoteServiceStatus(json_result)
  File "/usr/local/lib/python3.9/site-packages/bimmer_connected/remote_services.py", line 64, in __init__
    self.state = ExecutionState(status or 'UNKNOWN')
  File "/usr/local/lib/python3.9/enum.py", line 384, in __call__
    return cls.__new__(cls, value)
  File "/usr/local/lib/python3.9/enum.py", line 702, in __new__
    raise ve_exc
ValueError: 'ERROR' is not a valid ExecutionState

Expected behavior

No error thrown

Which Home Assistant version are you using?

core-2021.12.4

What was the last working version of Home Assistant Core?

No response

What is your region?

Rest of world

ConnectedDrive website

Number of cars

Output of bimmer_connected fingerprint

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

rikroe commented 2 years ago

This looks as if the BMW servers were unable to contact your car or the command failed on BMW side.

I'll think about adding ERROR as valid execution state and then doing some additional debugging/logging with it.

github-actions[bot] commented 2 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.