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
74.15k stars 31.12k forks source link

Volvo on call: 'NoneType' object is not iterable #36873

Closed Segelfeldt closed 4 years ago

Segelfeldt commented 4 years ago

The problem

Noticed an error in the developer log regarding Volvo on call but the integration still seems to work, but it might be that i am missing some extra data?

Environment

arch x86_64
dev false
docker true
hassio false
installation_type Home Assistant Container
os_name Linux
os_version 4.4.59+
python_version 3.7.7
timezone Europe/Stockholm
version 0.111.2
virtualenv false

Problem-relevant configuration.yaml

volvooncall:
  username: !secret volvo_on_call_username
  password: !secret volvo_on_call_password
  scandinavian_miles: true

Traceback/Error logs

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 186, in _async_setup_platform
    await asyncio.gather(*pending)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 292, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 443, in _async_add_entity
    entity.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 297, in async_write_ha_state
    self._async_write_ha_state()  # type: ignore
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 324, in _async_write_ha_state
    attr.update(self.device_state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/volvooncall/__init__.py", line 282, in device_state_attributes
    model=f"{self.vehicle.vehicle_type}/{self.vehicle.model_year}",
TypeError: 'NoneType' object is not iterable

Additional information

I activated volvo on call for my car today, and setup the integration today. The app seems to work and the integration seems to work.

Segelfeldt commented 4 years ago

Can add that the model name and year is shown in the UI so it seems to be able to fetch that some how. Untitled

probot-home-assistant[bot] commented 4 years ago

volvooncall documentation volvooncall source (message by IssueLinks)

stale[bot] commented 4 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.