core: Environment Canada Weather fails to start

The problem

Upon initial installation of the Environment Canada weather integration, the integration fails to start.

What is version of Home Assistant Core has the issue?

2021.5.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

Environment Canada

Link to integration documentation on our website

https://www.home-assistant.io/integrations/environment_canada/#weather

Example YAML snippet

weather:
  - platform: environment_canada


### Anything in the logs that might be useful for us?

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 558, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 581, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 334, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 368, in _async_write_ha_state
    state = self._stringify_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 340, in _stringify_state
    state = self.state
  File "/usr/src/homeassistant/homeassistant/components/weather/__init__.py", line 206, in state
    return self.condition
  File "/usr/src/homeassistant/homeassistant/components/environment_canada/weather.py", line 164, in condition
    elif self.ec_data.hourly_forecasts[0].get("icon_code"):
IndexError: list index out of range

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 16 (7 by maintainers)

Most upvoted comments

It’s coming back. PRs are backlogged. We’re looking at seeing if that work can be accelerated.

@campbellr AQHI has been added back in: image