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

Unexpected error fetching environment_canada weather data: could not convert string to float: 'calm' #90852

Closed
regan-a opened this issue Apr 5, 2023 · 3 comments

Comments

@regan-a
Copy link

regan-a commented Apr 5, 2023

The problem

The Environment Canada integration is failing when specific weather conditions exist (presence of 'calm').

What version of Home Assistant Core has the issue?

core-2023.3.5

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.environment_canada
Source: components/environment_canada/__init__.py:117
Integration: Environment Canada (documentation, issues)
First occurred: 08:07:19 (9 occurrences)
Last logged: 08:45:21

Unexpected error fetching environment_canada weather data: could not convert string to float: 'calm'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 239, in _async_refresh
    self.data = await self._async_update_data()
  File "/usr/src/homeassistant/homeassistant/components/environment_canada/__init__.py", line 117, in _async_update_data
    await self.ec_data.update()
  File "/usr/local/lib/python3.10/site-packages/env_canada/ec_weather.py", line 420, in update
    self.conditions[c].update(get_condition(meta))
  File "/usr/local/lib/python3.10/site-packages/env_canada/ec_weather.py", line 400, in get_condition
    condition["value"] = int(float(element.text))
ValueError: could not convert string to float: 'calm'

Additional information

No response

@home-assistant
Copy link

home-assistant bot commented Apr 5, 2023

Hey there @gwww, @michaeldavie, mind taking a look at this issue as it has been labeled with an integration (environment_canada) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of environment_canada can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign environment_canada Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


environment_canada documentation
environment_canada source
(message by IssueLinks)

@michaeldavie
Copy link
Contributor

Duplicate of #90851

@michaeldavie
Copy link
Contributor

@home-assistant close

@home-assistant home-assistant bot closed this as completed Apr 5, 2023
@github-actions github-actions bot locked and limited conversation to collaborators May 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants