Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lights_parking sensor no longer available #296

Closed
2 of 4 tasks
lolouk44 opened this issue Jul 28, 2021 · 2 comments · Fixed by #295
Closed
2 of 4 tasks

lights_parking sensor no longer available #296

lolouk44 opened this issue Jul 28, 2021 · 2 comments · Fixed by #295
Assignees
Labels
bug 🐛 Something isn't working

Comments

@lolouk44
Copy link

Describe the issue

One of the sensors (binary_sensor.lights_parking) is always showing unavailable since the past 2 HA releases and my logs get flooded with this:

2021-07-28 18:03:50 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 406, in async_update_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in _async_write_ha_state
extra_state_attributes = self.extra_state_attributes
File "/usr/src/homeassistant/homeassistant/components/bmw_connected_drive/binary_sensor.py", line 127, in extra_state_attributes
result["lights_parking"] = vehicle_state.parking_lights.value
AttributeError: 'NoneType' object has no attribute 'value'

Expected behavior

The sensor is available is accurate

Which Home Assistant version are you using?

core-2021.7.4

What was the last working version of Home Assistant Core?

core-2021.5.4

What is your region?

Rest of world

ConnectedDrive website

  • I can still successfully login to the BMW ConnectedDrive website and the car status is available there.
  • I have ConnectedDrive enabled for my vehicle.

Number of cars

  • I have 2 or more cars linked to the ConnectedDrive account.
  • I have a Mini vehicle linked to my account.

Output of bimmer_connected fingerprint

DEBUG:bimmer_connected.account:Getting vehicle list
DEBUG:bimmer_connected.account:getting new oauth token
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): customer.bmwgroup.com:443
DEBUG:urllib3.connectionpool:https://customer.bmwgroup.com:443 "POST /gcdm/oauth/token HTTP/1.1" 200 None
DEBUG:bimmer_connected.account:got new token [redacted] with expiration date 2021-07-28 21:59:07.231850
DEBUG:bimmer_connected.account:Old token is still valid. Not getting a new one.
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): b2vapi.bmwgroup.com:443
DEBUG:urllib3.connectionpool:https://b2vapi.bmwgroup.com:443 "GET /webapi/v1/user/vehicles HTTP/1.1" 200 None
DEBUG:bimmer_connected.state:requesting new data from connected drive
DEBUG:bimmer_connected.account:Old token is still valid. Not getting a new one.
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): b2vapi.bmwgroup.com:443
DEBUG:urllib3.connectionpool:https://b2vapi.bmwgroup.com:443 "GET /webapi/v1/user/vehicles/[redacted]/status?deviceTime=2021-07-28T20%3A59%3A07&dlat=0.0&dlon=0.0 HTTP/1.1" 200 None
DEBUG:bimmer_connected.state:{'STATUS': {'vin': '[redacted]', 'mileage': 46555, 'updateReason': 'VEHICLE_SHUTDOWN_SECURED', 'updateTime': '2021-07-28T08:44:35+0000', 'doorDriverFront': 'CLOSED', 'doorDriverRear': 'CLOSED', 'doorPassengerFront': 'CLOSED', 'doorPassengerRear': 'CLOSED', 'windowDriverFront': 'CLOSED', 'windowDriverRear': 'CLOSED', 'windowPassengerFront': 'CLOSED', 'windowPassengerRear': 'CLOSED', 'trunk': 'CLOSED', 'rearWindow': 'INVALID', 'hood': 'CLOSED', 'doorLockState': 'SECURED', 'remainingFuel': 22, 'remainingRangeFuel': 340, 'remainingRangeFuelMls': 211, 'position': {'lat': [redacted], 'lon': [redacted], 'heading': 80, 'status': 'OK'}, 'internalDataTimeUTC': '2021-07-28T08:44:35', 'singleImmediateCharging': False, 'vehicleCountry': 'GB', 'checkControlMessages': [], 'cbsData': [{'cbsType': 'OIL', 'cbsState': 'OK', 'cbsRemainingMileage': 7000, 'cbsDueDate': '2021-10', 'cbsDescription': 'Next service due when the stated distance has been covered or by the specified date.'}, {'cbsType': 'VEHICLE_CHECK', 'cbsState': 'OK', 'cbsRemainingMileage': 7000, 'cbsDueDate': '2021-10', 'cbsDescription': 'Next visual inspection due when the stated distance has been covered or by the stated date.'}, {'cbsType': 'VEHICLE_TUV', 'cbsState': 'OK', 'cbsDueDate': '2022-01', 'cbsDescription': 'Next statutory vehicle inspection due by the stated date.'}, {'cbsType': 'BRAKE_FLUID', 'cbsState': 'OK', 'cbsDueDate': '2023-01', 'cbsDescription': 'Next change due at the latest by the stated date.'}], 'DCS_CCH_Activation': 'NA', 'DCS_CCH_Ongoing': False}, 'LAST_TRIP': {}, 'ALL_TRIPS': {}, 'CHARGING_PROFILE': {}, 'DESTINATIONS': {}, 'RANGEMAP': {}, 'EFFICIENCY': {}, 'NAVIGATION': {}}
DEBUG:bimmer_connected.state:received new data from connected drive
fingerprint of the vehicles written to /root/vehicle_fingerprint/2021-07-28_20-59-06

Anything in the logs that might be useful for us?

2021-07-28 18:03:50 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 406, in async_update_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in _async_write_ha_state
extra_state_attributes = self.extra_state_attributes
File "/usr/src/homeassistant/homeassistant/components/bmw_connected_drive/binary_sensor.py", line 127, in extra_state_attributes
result["lights_parking"] = vehicle_state.parking_lights.value
AttributeError: 'NoneType' object has no attribute 'value'

Additional information

No response

@lolouk44 lolouk44 added the bug 🐛 Something isn't working label Jul 28, 2021
@gerard33
Copy link
Member

The parking light data is not available anymore, at least for some cars, in the BMW ConnectedDrive API. I had the same with my car.
Fix is on the way -> #295

@gerard33 gerard33 self-assigned this Jul 29, 2021
@gerard33 gerard33 linked a pull request Jul 29, 2021 that will close this issue
6 tasks
@gerard33 gerard33 mentioned this issue Jul 29, 2021
6 tasks
@github-actions
Copy link

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.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants