home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.32k stars 30.62k forks source link

Error when selecting BMW Charging Mode #125411

Closed Tylast closed 4 weeks ago

Tylast commented 1 month ago

The problem

I am able to select immediately or delayed charging. However, when I select "No Action" I get an error. Why is that?

What version of Home Assistant Core has the issue?

core-2024.8.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

BMW Connected Drive

Link to integration documentation on our website

https://www.home-assistant.io/integrations/bmw_connected_drive/

Diagnostics information

bmw_connected_drive-7b239ef1b7669297d5f7ba4b8e636143-X5 xDrive45e-db30cd232ad4ddec0b6280758f91d30a.json

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/commands.py:241
integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 6:27:00 AM (7 occurrences)
Last logged: 6:52:46 AM

[140710207722624] Unexpected exception
[140710204983328] Unexpected exception
[140710205701520] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 241, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2763, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2806, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 999, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1071, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/select/__init__.py", line 188, in async_handle_select_option
    await self.async_select_option(option)
  File "/usr/src/homeassistant/homeassistant/components/bmw_connected_drive/select.py", line 122, in async_select_option
    await self.entity_description.remote_service(self.vehicle, option)
  File "/usr/local/lib/python3.12/site-packages/bimmer_connected/vehicle/remote_services.py", line 279, in trigger_charging_profile_update
    target_charging_profile["chargingMode"]["chargingPreference"] = CHARGING_MODE_TO_CHARGING_PREFERENCE[
                                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: <ChargingMode.NO_ACTION: 'NO_ACTION'>

Additional information

No response

home-assistant[bot] commented 1 month ago

Hey there @gerard33, @rikroe, mind taking a look at this issue as it has been labeled with an integration (bmw_connected_drive) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `bmw_connected_drive` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign bmw_connected_drive` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


bmw_connected_drive documentation bmw_connected_drive source (message by IssueLinks)

Tylast commented 1 month ago

I'm just following up. Any updates? Thx.

Tylast commented 1 month ago

I'm still receiving the error.

lindsand commented 4 weeks ago

All BMWs are not supporting "No Action", I have an X1 and only options available in the menus in the car are "Immediate" or "Delayed Charging" . So "No Action" is failing for me also because the car can't store it.

Tylast commented 4 weeks ago

Gotcha. Thanks for the update.