Open chasut opened 2 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!
(message by CodeOwnersMention)
weatherflow_cloud documentation weatherflow_cloud source (message by IssueLinks)
I think if you turn on debugging, you can see the rest response
Just confirming that I am seeing the same errors
I think if you turn on debugging, you can see the rest response
I did turn on debug. Should be in the log snippet I attached. If not, happy to do so again.
edit:
Interesting. it looks like the value is fine ->... ,"feels_like":25.0,...
but then get -> ... || to || <class 'weatherflow4py.models.rest.forecast.WeatherDataForecastREST'> -- 'feels_like'
2024-09-14 08:49:42.149 ERROR (MainThread) [homeassistant.components.weatherflow_cloud] Unexpected error fetching weatherflow_cloud data
Traceback (most recent call last)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 354, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/weatherflow_cloud/coordinator.py", line 35, in _async_update_data
return await self.weather_api.get_all_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/weatherflow4py/api.py", line 168, in get_all_data
weather=await self.async_get_forecast(station_id=station.station_id),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/weatherflow4py/api.py", line 99, in async_get_forecast
return await self._make_request(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/weatherflow4py/api.py", line 61, in _make_request
raise e
File "/usr/local/lib/python3.12/site-packages/weatherflow4py/api.py", line 56, in _make_request
return response_model.from_json(data) if response_model else None
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/dataclasses_json/api.py", line 63, in from_json
return cls.from_dict(kvs, infer_missing=infer_missing)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/dataclasses_json/api.py", line 70, in from_dict
return _decode_dataclass(cls, kvs, infer_missing)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/dataclasses_json/core.py", line 229, in _decode_dataclass
value = _decode_dataclass(field_type, field_value,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/dataclasses_json/core.py", line 233, in _decode_dataclass
init_kwargs[field.name] = _decode_generic(field_type,
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/dataclasses_json/core.py", line 315, in _decode_generic
xs = _decode_items(_get_type_argparam(type, 0), value, infer_missing)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/dataclasses_json/core.py", line 410, in _decode_items
return list(_decode_type(type_args, x, infer_missing) for x in xs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/dataclasses_json/core.py", line 410, in
KeyError: 'feels_like'
I like tempest because they make their APIs available but the list of REQUIRED fields is 100% NOT accurate. The patch will be to make it optional which I dont love.
So I just pulled down a result.
feels_like
exists in current conditions but right now its missing in the forecast data.
{
"current_conditions": {
"air_density": 0.94,
"air_temperature": 21.0,
"brightness": 77371,
"conditions": "Clear",
"delta_t": 8.0,
"dew_point": 8.0,
"feels_like": 21.0,
"icon": "clear-day",
"is_precip_local_day_rain_check": true,
"is_precip_local_yesterday_rain_check": true,
"lightning_strike_count_last_1hr": 0,
"lightning_strike_count_last_3hr": 0,
"lightning_strike_last_distance": 30,
"lightning_strike_last_distance_msg": "28 - 32 km",
"lightning_strike_last_epoch": 1726094932,
"precip_accum_local_day": 0,
"precip_accum_local_yesterday": 0,
"precip_minutes_local_day": 0,
"precip_minutes_local_yesterday": 0,
"pressure_trend": "steady",
"relative_humidity": 45,
"sea_level_pressure": 1024.0,
"solar_radiation": 645,
"station_pressure": 797.3,
"time": 1726329646,
"uv": 6,
"wet_bulb_globe_temperature": 18.0,
"wet_bulb_temperature": 13.0,
"wind_avg": 1.0,
"wind_direction": 212,
"wind_direction_cardinal": "SSW",
"wind_gust": 2.0
},
"forecast": {
"daily": [
{
"air_temp_high": 25.1,
"air_temp_low": 9.5,
"conditions": "Clear",
"day_num": 14,
"day_start_local": 1726293600,
"icon": "clear-day",
"month_num": 9,
"precip_probability": 0,
"sunrise": 1726317639,
"sunset": 1726362505
},
...
"hourly": [
{
"air_temperature": 21.0,
"conditions": "Clear",
"icon": "clear-day",
"local_day": 14,
"local_hour": 11,
"precip": 0,
"precip_icon": "chance-rain",
"precip_probability": 0,
"precip_type": "storm",
"relative_humidity": 22,
"sea_level_pressure": 1014.0,
"time": 1726333200,
"wind_avg": 2.0,
"wind_direction": 197,
"wind_direction_cardinal": "SSW",
"wind_gust": 3.0
},
I may not be able to fix this until Monday - but - I'm going to say ... that something has clearly diverged from the documentation.
Issue Status:
Turns out uv was also missing..
I guess on the upside if they fix there $---, it will magically start working again. ... and it did. Now getting a forecast again. IIRC this has happened in the past. Been using the weatherflow2MQTT for years.
Thanks for jumping on this so fast.
Well, that's good now at least I can protect against it next time.
If I was going to start this all over again, I'd have every single field be optional
Looks to be down again
Down agin for me today
Seems to be flappy.
Thanks intermittent bug :)
It's been working OK for me since 11:22 pm ET last night.
I think this can be closed. It's been working great for the past few days for me
Whoever opened it shall have to close it ... or we just ignore it for like 60 days and it will auto close :)
No.. :) You can say "@home-assistant close" if you're the codeowner
@home-assistant close
The problem
Just started this morning. The integration is not returning data, including updated forecast. The integration reports:
Failed setup, will retry: 'feels_like. Similar error in the logs. I am pretty sure it was working until this morning, so it could be issues with the rest response.
What version of Home Assistant Core has the issue?
2024.9.1
What was the last working version of Home Assistant Core?
2024.9.1
What type of installation are you running?
Home Assistant OS
Integration causing the issue
WeatherflowCloud
Link to integration documentation on our website
https://www.home-assistant.io/integrations/weatherflow_cloud/
Diagnostics information
HA log snip.txt
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response