core: bmw_connected_drive: ligths_parking is unavailable

The problem

Environment

  • Home Assistant release with the issue: 0.106.5
  • Last working Home Assistant release (if known):
  • Operating environment (Hass.io/Docker/Windows/etc.): hass.io on Pi
  • Integration causing this issue: bmw_connected_drive
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/bmw_connected_drive/

Problem-relevant configuration.yaml

bmw_connected_drive:
  name: 
    username: !secret bmw_username
    password: !secret bmw_password
    region: "rest_of_world"

Traceback/Error logs

2020-03-05 21:49:10 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 284, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 328, in _async_write_ha_state
    attr.update(self.device_state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/bmw_connected_drive/binary_sensor.py", line 122, in device_state_attributes
    result["lights_parking"] = vehicle_state.parking_lights.value
AttributeError: 'NoneType' object has no attribute 'value'
![Screenshot 2020-03-05 at 22 23 45](https://user-images.githubusercontent.com/36936293/76026920-ff53b900-5f2f-11ea-87a4-dc528e52b0d1.png)

Additional information

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17 (5 by maintainers)

Most upvoted comments

Unfortunately The issue is not solved. I missed the bot stale notification…

I still have the issue in my logs. Updated to the newest versions.

File "/usr/src/homeassistant/homeassistant/components/bmw_connected_drive/binary_sensor.py", line 127, in device_state_attributes
  result["lights_parking"] = vehicle_state.parking_lights.value
AttributeError: 'NoneType' object has no attribute 'value'

It’s still on our list to fix in the bimmerconnected library.

We want to add another check to the function that determines which sensors are available and can be added to HA. That way the parking_lights will only be added when the data is available.

@nilsvdb82 the issue with the door_lock_state is solved in HA 0.107. The issue with lights_parking is on our list to fix.

Just done! Hope all is right

Thank You

Gerard wrote on 10/03/2020 00:18:

This is the first time I see this. Usually |lights_parking| is always available. Can you run a |fingerprint| from here https://github.com/bimmerconnected/bimmer_connected#data-contributions so I can check the details of your car?

For my X1 the parking light is available. From what year is your car?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/32515?email_source=notifications&email_token=AIZZUZORBZ4L752LAIOQTRDRGV2MDA5CNFSM4LCS3MY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOJNCQI#issuecomment-596824385, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIZZUZM26DUW6BGKUI5VJQ3RGV2MDANCNFSM4LCS3MYQ.

– Sent from Postbox https://www.postbox-inc.com