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.04k stars 31.07k forks source link

Integration with WeatherFlow_Cloud shows enum issue #112545

Closed p4r4n0y1ng closed 5 months ago

p4r4n0y1ng commented 8 months ago

The problem

Attempted to integrate with the new WeatherFlow Cloud integration. Provided API Key - received the following in the logs

ValueError: 'Heavy Rain' is not a valid Condition

What version of Home Assistant Core has the issue?

core-2024.3.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Core

Integration causing the issue

WeatherFlow Cloud

Link to integration documentation on our website

https://www.home-assistant.io/integrations/weatherflow_cloud

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Mar 06 18:24:05 hasspian hass[7807]: 2024-03-06 18:24:05.930 ERROR (MainThread) [homeassistant.components.weatherflow_cloud] Unexpected error fetching weatherflow_cloud data: 'Moderate Rain' is not a valid Condition
Mar 06 18:24:05 hasspian hass[7807]: Traceback (most recent call last):
Mar 06 18:24:05 hasspian hass[7807]:   File "/srv/homeassistant/venv/lib/python3.12/site-packages/homeassistant/helpers/update_coordinator.py", line 318, in _async_refresh
Mar 06 18:24:05 hasspian hass[7807]:     self.data = await self._async_update_data()
Mar 06 18:24:05 hasspian hass[7807]:                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Mar 06 18:24:05 hasspian hass[7807]:   File "/srv/homeassistant/venv/lib/python3.12/site-packages/homeassistant/components/weatherflow_cloud/coordinator.py", line 35, in _async_update_data
Mar 06 18:24:05 hasspian hass[7807]:     return await self.weather_api.get_all_data()
Mar 06 18:24:05 hasspian hass[7807]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Mar 06 18:24:05 hasspian hass[7807]:   File "/srv/homeassistant/venv/lib/python3.12/site-packages/weatherflow4py/api.py", line 137, in get_all_data
Mar 06 18:24:05 hasspian hass[7807]:     weather=await self.async_get_forecast(station_id=station.station_id),
Mar 06 18:24:05 hasspian hass[7807]:             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Mar 06 18:24:05 hasspian hass[7807]:   File "/srv/homeassistant/venv/lib/python3.12/site-packages/weatherflow4py/api.py", line 85, in async_get_forecast
Mar 06 18:24:05 hasspian hass[7807]:     return await self._make_request(
Mar 06 18:24:05 hasspian hass[7807]:            ^^^^^^^^^^^^^^^^^^^^^^^^^
Mar 06 18:24:05 hasspian hass[7807]:   File "/srv/homeassistant/venv/lib/python3.12/site-packages/weatherflow4py/api.py", line 44, in _make_request
Mar 06 18:24:05 hasspian hass[7807]:     response_model.from_json(data)
Mar 06 18:24:05 hasspian hass[7807]:   File "/srv/homeassistant/venv/lib/python3.12/site-packages/dataclasses_json/api.py", line 63, in from_json
Mar 06 18:24:05 hasspian hass[7807]:     return cls.from_dict(kvs, infer_missing=infer_missing)
Mar 06 18:24:05 hasspian hass[7807]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Mar 06 18:24:05 hasspian hass[7807]:   File "/srv/homeassistant/venv/lib/python3.12/site-packages/dataclasses_json/api.py", line 70, in from_dict
Mar 06 18:24:05 hasspian hass[7807]:     return _decode_dataclass(cls, kvs, infer_missing)
Mar 06 18:24:05 hasspian hass[7807]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Mar 06 18:24:05 hasspian hass[7807]:   File "/srv/homeassistant/venv/lib/python3.12/site-packages/dataclasses_json/core.py", line 216, in _decode_dataclass
Mar 06 18:24:05 hasspian hass[7807]:     value = _decode_dataclass(field_type, field_value,
Mar 06 18:24:05 hasspian hass[7807]:             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Mar 06 18:24:05 hasspian hass[7807]:   File "/srv/homeassistant/venv/lib/python3.12/site-packages/dataclasses_json/core.py", line 220, in _decode_dataclass
Mar 06 18:24:05 hasspian hass[7807]:     init_kwargs[field.name] = _decode_generic(field_type,
Mar 06 18:24:05 hasspian hass[7807]:                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Mar 06 18:24:05 hasspian hass[7807]:   File "/srv/homeassistant/venv/lib/python3.12/site-packages/dataclasses_json/core.py", line 272, in _decode_generic
Mar 06 18:24:05 hasspian hass[7807]:     res = type_(value)
Mar 06 18:24:05 hasspian hass[7807]:           ^^^^^^^^^^^^
Mar 06 18:24:05 hasspian hass[7807]:   File "/usr/local/lib/python3.12/enum.py", line 744, in __call__
Mar 06 18:24:05 hasspian hass[7807]:     return cls.__new__(cls, value)
Mar 06 18:24:05 hasspian hass[7807]:            ^^^^^^^^^^^^^^^^^^^^^^^
Mar 06 18:24:05 hasspian hass[7807]:   File "/usr/local/lib/python3.12/enum.py", line 1158, in __new__
Mar 06 18:24:05 hasspian hass[7807]:     raise ve_exc
Mar 06 18:24:05 hasspian hass[7807]: ValueError: 'Moderate Rain' is not a valid Condition

Additional information

No response

home-assistant[bot] commented 8 months ago

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

Code owner commands Code owners of `weatherflow_cloud` 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 weatherflow_cloud` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


weatherflow_cloud documentation weatherflow_cloud source (message by IssueLinks)

issue-triage-workflows[bot] commented 5 months 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 has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.