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.89k stars 30.95k forks source link

BMW Connected Drive - condition_based_services sensor attributes missing in 2024.8.0 #123476

Open Xlinx64 opened 3 months ago

Xlinx64 commented 3 months ago

The problem

After the update to 2024.8 the condition based binary sensor doesn't have any attributes anymore for detailed information. I used it to get the km and time until a service etc. is needed. E.g.:

I also had an issue where the condition based sensor was on until I drove more than the recommended distance. Then the sensor was off. Which is not correct.

What version of Home Assistant Core has the issue?

core-2024.8.0

What was the last working version of Home Assistant Core?

core-2024.7.3

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

config_entry-bmw_connected_drive-fad1d84374895a614fa3445145c07c9c.json

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 3 months 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)

mib1185 commented 3 months ago

maybe a regression of #120830 :thinking:

rikroe commented 3 months ago

Mhh, it might be a "regression" of BMW updating their API. With 2024.8, the library was upgraded to resemble the calls done by the latest MyBMW.

@mib1185 you have the same issue?

Could one of you try to get a diagnosis log with HA 2024.7.? Also, do you see required services somewhere in the MyBMW app?

As per @Xlinx64's diagnosis log, the API does not return any required services: image

Whereas the Demo vehicles from the MyBMW app still do: https://github.com/bimmerconnected/bimmer_connected/blob/master/bimmer_connected/tests/responses/G26/bmw-eadrax-vcs_v4_vehicles_state_WBA00000000DEMO02.json#L231-L261

mib1185 commented 3 months ago

@mib1185 you have the same issue?

i do not own a BMW :laughing: i was just checking the issue against previous changes in this integration

Xlinx64 commented 3 months ago

@rikroe I am not sure if I can downgrade easily. I see the required services in the Mini App: IMG_5665

rikroe commented 3 months ago

Downgrading the existing installation probably does not make sense. You could try spinning up a second one.

However if you see these services in the app, but they are not part of the API response, BMW have changed something.

sammyh2506 commented 3 months ago

Same issue here, all the detailed information has vanished from Home Assistant...

rikroe commented 3 months ago

I have checked this against the current demo vehicles, they still return the services on the old endpoint. I'm a loss right now why your vehicles don't show this tbh.

run-mike commented 3 months ago

Hi! I experience the same issue. At first I thought the problem is the BMW API, as it was a few times in the past. But not this time. Node-Red decodes the data still correct. Problem occured after updating to 2024.8.

I checked my test-system (aka plaything), where there is still 2024.6:

HAss_issue_CBS_data_missing_2

Mike

nosfaratu commented 3 months ago

The same thing happened to me.. I removed the integration and now it won't log in. I have the latest version of HA.

MyBMWAPIError) HTTPStatusError: Failed to fetch Vehicle Features

Auka84 commented 3 months ago

@nosfaratu do you also have this error ?

since yesterday, too many request and impossible to use the integration

Capture d’écran 2024-08-23 à 08 05 41

run-mike commented 3 months ago

Yes, Unfortunately I do too. But this is a different problem. It has AGAIN to do with BMW fumbling with the API. Node-Red shows the same problem. Meaning, that everything using the API (except the MyBMW-App) gets the "error 429" at the moment. I deactivated the integration yesterday to see if the cause for too many requests is HA. But Node-Red still shows "error 429" today.

Mike

jjvelar commented 3 months ago

@nosfaratu do you also have this error ?

since yesterday, too many request and impossible to use the integration

Capture d’écran 2024-08-23 à 08 05 41

I have the same issue...

Schermbecker commented 3 months ago

Same here.

rikroe commented 3 months ago

Regarding quota issue, please see https://github.com/home-assistant/core/issues/124464. tl;dr: If you have the QuotaError, disable the integration and retry after 0:00 UTC.

Will try to have a look why demo vehicles still show condition based services in the app, but actual cars don't. My car is too old to have those unfortunately.

christian-hoekstra commented 2 months ago

I have the same issue. Debug message here:

`instead, please create a bug report at https://github.com/hacs/integration/issues 2024-08-30 15:11:08.453 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template<template=( Item Status Date Distance
Check {{ states.binary_sensor.x3_xdrive20i_condition_based_services.attributes.vehicle_check }} {{ states.binary_sensor.x3_xdrive20i_condition_based_services.attributes.vehicle_check_date }} {{ states.binary_sensor.x3_xdrive20i_condition_based_services.attributes.vehicle_check_distance }}
APK {{ states.binary_sensor.x3_xdrive20i_condition_based_services.attributes.vehicle_tuv }} {{ states.binary_sensor.x3_xdrive20i_condition_based_services.attributes.vehicle_tuv_date }} n/a
Brake Fluid {{ states.binary_sensor.x3_xdrive20i_condition_based_services.attributes.brake_fluid }} {{ states.binary_sensor.x3_xdrive20i_condition_based_services.attributes.brake_fluid_date }} n/a
Oil {{ states.binary_sensor.x3_xdrive20i_condition_based_services.attributes.oil }} {{ states.binary_sensor.x3_xdrive20i_condition_based_services.attributes.oil_date }} {{ states.binary_sensor.x3_xdrive20i_condition_based_services.attributes.oil_distance }} ) renders=14>

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 603, in async_render render_result = _render_with_context(self.template, compiled, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2638, in _render_with_context return template.render(kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/jinja2/environment.py", line 1304, in render self.environment.handle_exception() File "/usr/local/lib/python3.12/site-packages/jinja2/environment.py", line 939, in handle_exception raise rewrite_traceback_stack(source=source) File "