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

meteo_france crashes at start #24244

Closed
wsw70 opened this issue Jun 1, 2019 · 12 comments · Fixed by #24315
Closed

meteo_france crashes at start #24244

wsw70 opened this issue Jun 1, 2019 · 12 comments · Fixed by #24315

Comments

@wsw70
Copy link

wsw70 commented Jun 1, 2019

Home Assistant release with the issue: 0.93.2

Last working Home Assistant release (if known): probably pre-0.93

Operating environment (Hass.io/Docker/Windows/etc.): docker image homeassistant/home-assistant

Component/platform: meteo_france

Description of problem:

The Météo France component does not start anymore (it used to with teh same config on a previous version)

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

meteo_france:
  - city: '78000'
  - city: '78140'

Traceback (if applicable):

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 365, in _async_add_entity
    await entity.async_update_ha_state()
  File "/usr/src/app/homeassistant/helpers/entity.py", line 225, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/app/homeassistant/helpers/entity.py", line 255, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/app/homeassistant/components/weather/__init__.py", line 153, in state_attributes
    if self.forecast is not None:
  File "/usr/src/app/homeassistant/components/meteo_france/weather.py", line 85, in forecast
    for key in self._data['forecast']:
KeyError: 'forecast'

Additional information:
@victorcerutti please let me know if I can help with the debugging

@Quentame
Copy link
Member

Quentame commented Jun 1, 2019

Hi @wsw70 !

I have the same issue !
It started today around lunch, maybe an API change ...

Not all sensors are down perhaps, only :

  • sensor.[city]_freeze_chance
  • sensor.[city]_uv
  • sensor.[city]_snow_change
  • weather.[city]

configuration

meteo_france:
  - city: '69004'
    monitored_conditions:
      - temperature
      - weather
      - wind_speed
      - uv
      - next_rain
      - freeze_chance
      - rain_chance
      - snow_chance
      - thunder_chance

Capture d’écran 2019-06-01 à 20 46 20

Capture d’écran 2019-06-01 à 20 49 53

@outadoc
Copy link
Contributor

outadoc commented Jun 1, 2019

Confirmed here on 0.93.1. I only use the weather widget, and it seems stuck showing last night's weather.

2678C419-1C79-4CF1-BE5A-C8F19B42709A

@wsw70
Copy link
Author

wsw70 commented Jun 1, 2019

@Quentame @outadoc Thanks for the confirmation. I moved HA from a standalone server to a dockerized one, upping the version at the occasion. I am sure that the widget used to work but I am not sure of the previous version.

How do you create the card? Manually by adding elements? I think I had a card similar to DarkSky already pre-formatted with the temperature in larger font, icons for the weather conditions (clouds, sun, ...)

@victorcerutti
Copy link
Contributor

Hello,

Thanks for the report. I found out the issue.
This component relies on scrapping and some elements have changed.
I just made a fix for this issue and will have to submit a PR to Home Assistant to fix your local installation

I will keep you posted here when it's done

victorcerutti added a commit to victorcerutti/home-assistant that referenced this issue Jun 5, 2019
cgarwood pushed a commit that referenced this issue Jun 6, 2019
* Update meteofrance package version

Fix #24244

* Add code owner to manifest

* Update CODEOWNERS
@Imbuzi
Copy link
Contributor

Imbuzi commented Jun 24, 2019

Hi @wsw70 !

Same issue since I've installed this component on my Hass.io instance. It just retrieves some sensor informations, but no forecast is given, and I have this traceback :

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 365, in _async_add_entity
    await entity.async_update_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 225, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 255, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/weather/__init__.py", line 153, in state_attributes
    if self.forecast is not None:
  File "/config/custom_components/meteo_france/weather.py", line 86, in forecast
    for key in self._data['forecast']:
KeyError: 'forecast'

@wsw70
Copy link
Author

wsw70 commented Jun 24, 2019

Same issue since I've installed this component on my Hass.io instance

@Imbuzi I believe it is in the dev branch as for now, should be merged into master and, subsequently, a release some time in the future.

@Imbuzi
Copy link
Contributor

Imbuzi commented Jun 25, 2019

Same issue since I've installed this component on my Hass.io instance

@Imbuzi I believe it is in the dev branch as for now, should be merged into master and, subsequently, a release some time in the future.

I'm not sure the new release will resolve the issue. I've tried to put the code from the dev branch as a custom component, but it doesn't seem to be working with this code too.
Did you test it recently from an Home Assistant instance ?

@wsw70
Copy link
Author

wsw70 commented Jun 25, 2019

Did you test it recently from an Home Assistant instance ?

No, in the sense that I have a dockerized HA installation, which updates itself automatically.
I am currently on 0.94.4 and see that the error is still there in the logs.

@beavis69
Copy link

I'm using dockerized HA install too.

With homeassistant/home-assistant:latest forecast doesn't work, but if i switch to homeassistant/home-assistant:dev forcast works.

@beavis69
Copy link

it seems forecast also works with thehomeassistant/home-assistant:rc tagged docker image (0.95.0b4)

@Imbuzi
Copy link
Contributor

Imbuzi commented Jun 27, 2019

I've just updated to 0.95, and it works :)

@wsw70
Copy link
Author

wsw70 commented Jun 27, 2019

Yes, after my nighly update to 0.95 it does indeed work. Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants