8000 yweather weather component failed since #10555 · Issue #10618 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

yweather weather component failed since #10555 #10618

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

Closed
loongyh opened this issue Nov 16, 2017 · 2 comments · Fixed by #10661
Closed

yweather weather component failed since #10555 #10618

loongyh opened this issue Nov 16, 2017 · 2 comments · Fixed by #10661

Comments

@loongyh
Copy link
Contributor
loongyh commented Nov 16, 2017

Make sure you are running the latest version of Home Assistant before reporting an issue.

You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:

Home Assistant release (hass --version):
0.58.0.dev0

Python release (python3 --version):
3.4

Component/platform:
homeassistant.components.weather.yweather

Description of problem:
Stopped working since pr #10555

Expected:
yweather weather panel to show up.

Problem-relevant configuration.yaml entries and steps to reproduce:

weather:
- platform: yweather
  1. Git checkout to d25f676 or later.
  2. Activate yweather weather component in configuration.yaml.
  3. yweather weather component does not work, traceback attached below.

Traceback (if applicable):

2017-11-16 19:53:43 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/tasks.py", line 237, in _step
    result = next(coro)
  File "/home-assistant/homeassistant/helpers/entity_component.py", line 398, in async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/home-assistant/homeassistant/helpers/entity_component.py", line 246, in async_add_entity
    yield from entity.async_update_ha_state()
  File "/home-assistant/homeassistant/helpers/entity.py", line 216, in async_update_ha_state
    attr = self.state_attributes or {}
  File "/home-assistant/homeassistant/components/weather/__init__.py", line 112, in state_attributes
    self.precision),
  File "/home-assistant/homeassistant/helpers/temperature.py", line 21, in display_temp
    "Temperature is not a number: {}".format(temperature))
TypeError: Temperature is not a number: 25

Additional info:

@loongyh
Copy link
Contributor Author
loongyh commented Nov 16, 2017

Casting the temperature to int before returning the value seems to fix it.

Line 116 in homeassistant/components/weather/yweather.py:

def temperature(self):
    """Return the temperature."""
    return int(self._data.yahoo.Now['temp'])

@tinloaf
Copy link
Contributor
tinloaf commented Nov 18, 2017

Thanks for figuring this out. 👍

@home-assistant home-assistant locked and limited conversation to collaborators Mar 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
0