Closed razamattaz closed 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)
Are you able to pull down any more debugging info? Can you turn on debugging for weatherflow4py
in your configuration.yaml?
On 18 Mar 2024, at 14:45, Jeef wrote:
Are you able to pull down any more debugging info? Can you turn on debugging for
weatherflow4py
in your configuration.yaml?
Yep, I have had to head into work so it will be this evening. As I couldn’t get past the error screen I couldn’t turn on debugging in the integration itself.
No I stayed. I am new to debugging manually so I added:
logger: default: critical logs: homeassistant.components.weatherflow4py: debug
to /homeassistant/configuration.yaml then reloaded the YAML
Then tried again at 15:14:15 GMT and looked in /homeassistant/home-assistant.log
2024-03-18 15:14:16.485 ERROR (MainThread) [aiohttp.server] Error
handling request
Traceback (most recent call last):
File
"/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line
452, in _handle_request
resp = await request_handler(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py",
line 543, in _handle
resp = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File
"/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py",
line 114, in impl
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File
"/usr/src/homeassistant/homeassistant/components/http/security_filter.py",
line 91, in security_filter_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File
"/usr/src/homeassistant/homeassistant/components/http/forwarded.py",
line 100, in forwarded_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File
"/usr/src/homeassistant/homeassistant/components/http/request_context.py",
line 25, in request_context_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/ban.py",
line 79, in ban_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/auth.py",
line 235, in auth_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File
"/usr/src/homeassistant/homeassistant/components/http/headers.py", line
31, in headers_middleware
response = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 68,
in handle
result = await handler(request, request.match_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/usr/src/homeassistant/homeassistant/components/http/decorators.py",
line 72, in with_admin
return await func(self, request, *args, *kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/usr/src/homeassistant/homeassistant/components/config/config_entries.py",
line 197, in post
return await super().post(request, flow_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/usr/src/homeassistant/homeassistant/components/http/data_validator.py",
line 72, in wrapper
result = await method(view, request, data, args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line
111, in post
result = await self._flow_mgr.async_configure(flow_id, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line
359, in async_configure
result = await self._async_configure(flow_id, user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line
405, in _async_configure
result = await self._async_handle_step(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line
502, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/usr/src/homeassistant/homeassistant/components/weatherflow_cloud/config_flow.py",
line 68, in async_step_user
errors = await _validate_api_token(api_token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/usr/src/homeassistant/homeassistant/components/weatherflow_cloud/config_flow.py",
line 22, in _validate_api_token
await api.async_get_stations()
File "/usr/local/lib/python3.12/site-packages/weatherflow4py/api.py",
line 56, in async_get_stations
ret = await self._make_request("stations",
response_model=StationsResponse)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/weatherflow4py/api.py",
line 44, in _make_request
response_model.from_json(data)
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
220, in _decode_dataclass
init_kwargs[field.name] = _decode_generic(field_type,
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/usr/local/lib/python3.12/site-packages/dataclasses_json/core.py", line
291, 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
399, in _decode_items
return list(_decode_item(type_args, x) for x in xs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/usr/local/lib/python3.12/site-packages/dataclasses_json/core.py", line
399, in
KeyError: 'device_id'
I see called to weatherflow4py there, so hopefully there is something
useful.
If it helps I can send you my personal use token…
I have to pop into work, but will be back in 2-3 hours.
Raza
Seeing the same thing: access token is working correctly and I'm getting a response from the /stations endpoint. But the config flow raises an error on decoding device_id
(same stack trace). It doesn't say at what point in parsing the json it encounters that error, but I see device_id
appear 10 times in the response json.
Looks like the forecast
item doesn't have a device_id
associated in the /stations endpoint:
{
"stations": [
{
"created_epoch": 1617410209,
"devices": [
{
"device_id": 134144,
"device_meta": {
"agl": 0,
"environment": "indoor",
"name": "HB-00035380",
"wifi_network_name": ""
},
"device_type": "HB",
"firmware_revision": "194",
"hardware_revision": "0",
"location_id": 45824,
"serial_number": "HB-00035380"
},
{
"device_id": 134145,
"device_meta": {
"agl": 4.26720005273819,
"environment": "outdoor",
"name": "Weather Needle",
"wifi_network_name": ""
},
"device_settings": {
"show_precip_final": true
},
"device_type": "ST",
"firmware_revision": "156",
"hardware_revision": "1",
"location_id": 45824,
"serial_number": "ST-00031488"
}
],
"is_local_mode": false,
"last_modified_epoch": 1656428823,
"latitude": 40.37409,
"location_id": 45824,
"longitude": -74.94667,
"name": "Weather Needle",
"public_name": "Elm St Weather Needle",
"station_id": 45824,
"station_items": [
{
"device_id": 134145,
"item": "air_temperature_humidity",
"location_id": 45824,
"location_item_id": 379550,
"sort": 0,
"station_id": 45824,
"station_item_id": 379550
},
{
"device_id": 134145,
"item": "barometric_pressure",
"location_id": 45824,
"location_item_id": 379552,
"sort": 1,
"station_id": 45824,
"station_item_id": 379552
},
{
"device_id": 134144,
"item": "diagnostics",
"location_id": 45824,
"location_item_id": 379669,
"station_id": 45824,
"station_item_id": 379669
},
{
"device_id": 134145,
"item": "diagnostics",
"location_id": 45824,
"location_item_id": 379670,
"station_id": 45824,
"station_item_id": 379670
},
{
"item": "forecast",
"location_id": 45824,
"location_item_id": 379671,
"station_id": 45824,
"station_item_id": 379671
},
{
"device_id": 134145,
"item": "light",
"location_id": 45824,
"location_item_id": 379554,
"sort": 4,
"station_id": 45824,
"station_item_id": 379554
},
{
"device_id": 134145,
"item": "lightning",
"location_id": 45824,
"location_item_id": 379551,
"sort": 2,
"station_id": 45824,
"station_item_id": 379551
},
{
"device_id": 134145,
"item": "rain",
"location_id": 45824,
"location_item_id": 379553,
"sort": 5,
"station_id": 45824,
"station_item_id": 379553
},
{
"device_id": 134145,
"item": "wind",
"location_id": 45824,
"location_item_id": 379555,
"sort": 3,
"station_id": 45824,
"station_item_id": 379555
}
],
"station_meta": {
"elevation": 24.4730167388916,
"share_with_wf": true,
"share_with_wu": true
},
"timezone": "America/New_York",
"timezone_offset_minutes": -240
}
],
"status": {
"status_code": 0,
"status_message": "SUCCESS"
}
}
I’m on vacation for the week but can you also debug weatherflow4py?Sent from my iPhoneOn Mar 21, 2024, at 9:48 PM, Joe @.***> wrote: stations endpoint response: { "stations": [ { "created_epoch": 1617410209, "devices": [ { "device_id": 134144, "device_meta": { "agl": 0, "environment": "indoor", "name": "HB-00035380", "wifi_network_name": "" }, "device_type": "HB", "firmware_revision": "194", "hardware_revision": "0", "location_id": 45824, "serial_number": "HB-00035380" }, { "device_id": 134145, "device_meta": { "agl": 4.26720005273819, "environment": "outdoor", "name": "Weather Needle", "wifi_network_name": "" }, "device_settings": { "show_precip_final": true }, "device_type": "ST", "firmware_revision": "156", "hardware_revision": "1", "location_id": 45824, "serial_number": "ST-00031488" } ], "is_local_mode": false, "last_modified_epoch": 1656428823, "latitude": 40.37409, "location_id": 45824, "longitude": -74.94667, "name": "Weather Needle", "public_name": "Elm St Weather Needle", "station_id": 45824, "station_items": [ { "device_id": 134145, "item": "air_temperature_humidity", "location_id": 45824, "location_item_id": 379550, "sort": 0, "station_id": 45824, "station_item_id": 379550 }, { "device_id": 134145, "item": "barometric_pressure", "location_id": 45824, "location_item_id": 379552, "sort": 1, "station_id": 45824, "station_item_id": 379552 }, { "device_id": 134144, "item": "diagnostics", "location_id": 45824, "location_item_id": 379669, "station_id": 45824, "station_item_id": 379669 }, { "device_id": 134145, "item": "diagnostics", "location_id": 45824, "location_item_id": 379670, "station_id": 45824, "station_item_id": 379670 }, { "item": "forecast", "location_id": 45824, "location_item_id": 379671, "station_id": 45824, "station_item_id": 379671 }, { "device_id": 134145, "item": "light", "location_id": 45824, "location_item_id": 379554, "sort": 4, "station_id": 45824, "station_item_id": 379554 }, { "device_id": 134145, "item": "lightning", "location_id": 45824, "location_item_id": 379551, "sort": 2, "station_id": 45824, "station_item_id": 379551 }, { "device_id": 134145, "item": "rain", "location_id": 45824, "location_item_id": 379553, "sort": 5, "station_id": 45824, "station_item_id": 379553 }, { "device_id": 134145, "item": "wind", "location_id": 45824, "location_item_id": 379555, "sort": 3, "station_id": 45824, "station_item_id": 379555 } ], "station_meta": { "elevation": 24.4730167388916, "share_with_wf": true, "share_with_wu": true }, "timezone": "America/New_York", "timezone_offset_minutes": -240 } ], "status": { "status_code": 0, "status_message": "SUCCESS" } }
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
Looks like the forecast item doesn't have a device_id associated in the /stations endpoint. I haven't found the weatherflow4py code yet, but I'd imagine that's the one is failing on
Yes sure though it will be a few days before I am back in front of that console.
Raza
On Fri, 22 Mar 2024, at 03:59, Jeef wrote:
I’m on vacation for the week but can you also debug weatherflow4py?Sent from my iPhoneOn Mar 21, 2024, at 9:48 PM, Joe @.***> wrote: stations endpoint response: { "stations": [ { "created_epoch": 1617410209, "devices": [ { "device_id": 134144, "device_meta": { "agl": 0, "environment": "indoor", "name": "HB-00035380", "wifi_network_name": "" }, "device_type": "HB", "firmware_revision": "194", "hardware_revision": "0", "location_id": 45824, "serial_number": "HB-00035380" }, { "device_id": 134145, "device_meta": { "agl": 4.26720005273819, "environment": "outdoor", "name": "Weather Needle", "wifi_network_name": "" }, "device_settings": { "show_precip_final": true }, "device_type": "ST", "firmware_revision": "156", "hardware_revision": "1", "location_id": 45824, "serial_number": "ST-00031488" } ], "is_local_mode": false, "last_modified_epoch": 1656428823, "latitude": 40.37409, "location_id": 45824, "longitude": -74.94667, "name": "Weather Needle", "public_name": "Elm St Weather Needle", "station_id": 45824, "station_items": [ { "device_id": 134145, "item": "air_temperature_humidity", "location_id": 45824, "location_item_id": 379550, "sort": 0, "station_id": 45824, "station_item_id": 379550 }, { "device_id": 134145, "item": "barometric_pressure", "location_id": 45824, "location_item_id": 379552, "sort": 1, "station_id": 45824, "station_item_id": 379552 }, { "device_id": 134144, "item": "diagnostics", "location_id": 45824, "location_item_id": 379669, "station_id": 45824, "station_item_id": 379669 }, { "device_id": 134145, "item": "diagnostics", "location_id": 45824, "location_item_id": 379670, "station_id": 45824, "station_item_id": 379670 }, { "item": "forecast", "location_id": 45824, "location_item_id": 379671, "station_id": 45824, "station_item_id": 379671 }, { "device_id": 134145, "item": "light", "location_id": 45824, "location_item_id": 379554, "sort": 4, "station_id": 45824, "station_item_id": 379554 }, { "device_id": 134145, "item": "lightning", "location_id": 45824, "location_item_id": 379551, "sort": 2, "station_id": 45824, "station_item_id": 379551 }, { "device_id": 134145, "item": "rain", "location_id": 45824, "location_item_id": 379553, "sort": 5, "station_id": 45824, "station_item_id": 379553 }, { "device_id": 134145, "item": "wind", "location_id": 45824, "location_item_id": 379555, "sort": 3, "station_id": 45824, "station_item_id": 379555 } ], "station_meta": { "elevation": 24.4730167388916, "share_with_wf": true, "share_with_wu": true }, "timezone": "America/New_York", "timezone_offset_minutes": -240 } ], "status": { "status_code": 0, "status_message": "SUCCESS" } }
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/113739#issuecomment-2014310885, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIEU3I55DFY2TYESE43EOQLYZOUBFAVCNFSM6AAAAABE3PVDM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJUGMYTAOBYGU. You are receiving this because you authored the thread.Message ID: @.***>
I'm not in a rush - enjoy your vacation!
can you allow setting station id manually ?
To debug weatherflow4py - is this not the correct process, or am I simply looking in the wrong place for the log file (as in not /homeassistant/home-assistant.log)?
logger: default: critical logs: homeassistant.components.weatherflow4py: debug
to /homeassistant/configuration.yaml then reloaded the YAML
It's just weatherflow4py
Also I'm out of town for another few days so don't expect much help :)
Ok so what I was trying to say yesterday was:
You have an additional logger for
weatherflow4py: debug
you can add in..
can you allow setting station id manually ?
@razamattaz -> what do you mean? Like just allow it to pull observations from a single station?
In general the "desired" way of Core integration is to be as simple as possible... meaning ... if there is an automatic way to pull down station id "they" (the devs) prefer that approach....
I'm back from vacation however so I'm happy to start making mods again
Also an update -> I just got a failed integration due to a very "light" set of current conditions:
{
"current_conditions": {
"air_temperature": -2.0,
"conditions": "Partly Cloudy",
"delta_t": 1.0,
"dew_point": -4.0,
"feels_like": -2.0,
"icon": "partly-cloudy-night",
"is_precip_local_day_rain_check": false,
"pressure_trend": "rising",
"relative_humidity": 86,
"sea_level_pressure": 1012.7,
"solar_radiation": 0,
"time": 1711511255,
"uv": 0,
"wet_bulb_globe_temperature": 4.0,
"wet_bulb_temperature": -3.0,
"wind_avg": 1.0,
"wind_direction": 220,
"wind_direction_cardinal": "SW",
"wind_gust": 1.0
},
I'm not going to deal with this right now -> but if anybody else gets an error looks like I need to set a bunch more fields to "optional"
class CurrentConditions:
air_density: float
air_temperature: float
brightness: int
conditions: Condition
delta_t: float # Added missing field
dew_point: float
feels_like: float
icon: Icon # Added missing field
is_precip_local_day_rain_check: bool
lightning_strike_count_last_1hr: int
lightning_strike_count_last_3hr: int
lightning_strike_last_distance: int
lightning_strike_last_distance_msg: str
lightning_strike_last_epoch: int
precip_accum_local_day: int
precip_accum_local_yesterday: int
precip_minutes_local_day: int
precip_minutes_local_yesterday: int
pressure_trend: PressureTrend
relative_humidity: int
sea_level_pressure: float
solar_radiation: int
station_pressure: float
time: int
uv: int
wet_bulb_globe_temperature: float
wet_bulb_temperature: float
wind_avg: float
wind_direction: float
wind_direction_cardinal: WindDirection
wind_gust: float
is_precip_local_yesterday_rain_check: bool | None = None
It would appear a LOT more of these can be optional :(
can you allow setting station id manually ?
@razamattaz -> what do you mean? Like just allow it to pull observations from a single station?
In general the "desired" way of Core integration is to be as simple as possible... meaning ... if there is an automatic way to pull down station id "they" (the devs) prefer that approach....
I'm back from vacation however so I'm happy to start making mods again
That was @carefulcomputer rather than me.
Ok so what I was trying to say yesterday was:
You have an additional logger for
weatherflow4py: debug
you can add in..
Thanks. Currently I have this snippet in configuration.yaml (and apologies for the beginner approach to this):
logger: default: critical logs:
homeassistant.components.weatherflow4py: debug
weatherflow4py: debug
but I have tried it with just
logger: default: critical logs:
homeassistant.components.weatherflow4py: debug
weatherflow4py: debug
A check of the yaml doesn't through up any errors, but actually for either although I get the "Unknown error" when adding the integration after entering the personal api token, nothing appears to be added to the homeassistant.log file (after a restart of Home Assistant of course).
Not sure why this should be the case but until I work out what I am doing differently, I guess I will go quiet.
So the only suggestion I can have is whether you can pull down the data manually? I'm currently in an error state on my system because my tempest went off line for like 3 days. (even though it has the green light).
I haven't rebooted it yet because I wanted to make it work in the current error state... (which it now is). I don' know if this is related to you however as well.
If you are able to try out the endpoints here:
https://weatherflow.github.io/Tempest/api/swagger/
And either post or send me the data (jeef at vookie.net) - and I can turn it into a test case and we can figure out whats up
@razamattaz - got your data... I'll look at it shortly... (ish)
@razamattaz - based on the latest code base (which just got merged into a PR) I'm not seeing any issues with the data you sent...
I also have the same problem. This is my log:
2024-03-28 07:10:46.804 ERROR (MainThread) [homeassistant.components.weatherflow_cloud] Unexpected error fetching weatherflow_cloud data: 'precip_accum_local_day_final'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 318, 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 138, in get_all_data
observation=await self.async_get_observation(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/weatherflow4py/api.py", line 118, in async_get_observation
return await self._make_request(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/weatherflow4py/api.py", line 44, in _make_request
response_model.from_json(data)
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 220, in _decode_dataclass
init_kwargs[field.name] = _decode_generic(field_type,
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/dataclasses_json/core.py", line 291, in _decode_generic
xs = _decode_items(_get_type_arg_param(type_, 0), value, infer_missing)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/dataclasses_json/core.py", line 399, in _decode_items
return list(_decode_item(type_args, x) for x in xs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/dataclasses_json/core.py", line 399, in <genexpr>
return list(_decode_item(type_args, x) for x in xs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/dataclasses_json/core.py", line 372, in _decode_item
return _decode_dataclass(type_arg, x, infer_missing)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/dataclasses_json/core.py", line 172, in _decode_dataclass
field_value = kvs[field.name]
~~~^^^^^^^^^^^^
KeyError: 'precip_accum_local_day_final'
I think next release should have the fix for this - as backing lib 0.2.17
got merged in yesterday...
(aka if the field is missing - lets give it a default value)
But I could always be wrong :)
That PR just got merged so lets try again in a week :)
Will do and report back.
Raza
On 5 Apr 2024, at 15:13, Jeef wrote:
That PR just got merged so lets try again in a week :)
-- Reply to this email directly or view it on GitHub: https://github.com/home-assistant/core/issues/113739#issuecomment-2039913027 You are receiving this because you were mentioned.
Message ID: @.***>
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.
Is this working? I have been traveling much.
On Thu, Jul 4, 2024 at 10:06 AM issue-triage-workflows[bot] < @.***> wrote:
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.
— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/113739#issuecomment-2209288963, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRQ4XYREU3LADXUVZBRZLTZKVXHDAVCNFSM6AAAAABE3PVDM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBZGI4DQOJWGM . You are receiving this because you were mentioned.Message ID: @.***>
I was away for much of June, when I tested it periodically in between it still wouldn't work.
Now I see no integration called Weatherflowcloud, so has it been pulled from the Home Assistant Integration 'store'!
You sure?
I'm working on the sensor PR right now ... so i think its still in core :)
Yep. I am running 2024.7.0 and it doesn't list it
This is on Home Assistant Green - if that makes a difference?
You have to click through via Weatherflow
Ah yes, sorry, didn't notice the chevron on the right. When I do so and enter my Tempest API, I still get the 'Unknown error occurred' issue.
Also having issues with this. `Logger: homeassistant.components.weatherflow_cloud Source: helpers/update_coordinator.py:312 integration: WeatherflowCloud (documentation, issues) First occurred: July 25, 2024 at 11:29:49 PM (783 occurrences) Last logged: 4:54:57 PM
Unexpected error fetching weatherflow_cloud data
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 312, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/weatherflow_cloud/coordinator.py", line 36, in _async_update_data
return await self.weather_api.get_all_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/weatherflow4py/api.py", line 169, in get_all_data
observation=await self.async_get_observation(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/weatherflow4py/api.py", line 134, in async_get_observation
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 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: 'air_temperature'`
I have same issue. Logger: weatherflow4py Zdroj: components/weatherflow_cloud/config_flow.py:22 První výskyt: 11:21:41 (11 výskyty) Naposledy logováno: 11:41:02
Unable to convert data || {"stations":[{"created_epoch":1605887240,"devices":[{"device_id":101381,"device_meta":{"agl":0.0,"environment":"indoor","name":"HB-00036364","wifi_network_name":""},"device_type":"HB","firmware_revision":"194","hardware_revision":"0","location_id":32364,"serial_number":"HB-00036364"},{"device_id":101382,"device_meta":{"agl":6.0,"environment":"outdoor","name":"ST-00023242","wifi_network_name":""},"device_settings":{"show_precip_final":true},"device_type":"ST","firmware_revision":"181","hardware_revision":"1","location_id":32364,"serial_number":"ST-00057189"}],"is_local_mode":false,"last_modified_epoch":1656428823,"latitude":49.0,"location_id":32364,"longitude":18.0,"name":"a","public_name":"a","station_id":32364,"station_items":[{"device_id":101382,"item":"air_temperature_humidity","location_id":32364,"location_item_id":267725,"sort":0,"station_id":32364,"station_item_id":267725},{"device_id":101382,"item":"barometric_pressure","location_id":32364,"location_item_id":267727,"sort":1,"station_id":32364,"station_item_id":267727},{"device_id":101381,"item":"diagnostics","location_id":32364,"location_item_id":267762,"station_id":32364,"station_item_id":267762},{"device_id":101382,"item":"diagnostics","location_id":32364,"location_item_id":267763,"sort":6,"station_id":32364,"station_item_id":267763},{"item":"forecast","location_id":32364,"location_item_id":267764,"sort":7,"station_id":32364,"station_item_id":267764},{"device_id":101382,"item":"light","location_id":32364,"location_item_id":267729,"sort":4,"station_id":32364,"station_item_id":267729},{"device_id":101382,"item":"lightning","location_id":32364,"location_item_id":267726,"sort":2,"station_id":32364,"station_item_id":267726},{"device_id":101382,"item":"rain","location_id":32364,"location_item_id":267728,"sort":5,"station_id":32364,"station_item_id":267728},{"device_id":101382,"item":"wind","location_id":32364,"location_item_id":267730,"sort":3,"station_id":32364,"station_item_id":267730}],"station_meta":{"elevation":380.2833557128906,"share_with_wf":true,"share_with_wu":true},"timezone":"Europe/Prague","timezone_offset_minutes":120}],"status":{"status_code":0,"status_message":"SUCCESS"}} || to || <class 'weatherflow4py.models.rest.stations.StationsResponseREST'> -- 'device_id'
Thanks for posting the data. I'll try to get to it today to test the stuff but it might end up being next week
So here is the offensive data element that I've not seen before:
As configured the "elements" require a device_id
... I can probably set it to optional to get it to parse correctly
The problem
This error is seen after the entry of a newly generated Weatherflow Tempest Personal Access Token. The field in WeatherflowCloud this is added to refers to it as "personal api token" but the documentation at https://weatherflow.github.io/Tempest/api/ suggests I am probably adding the correct thing.
If I call the token directly with https://swd.weatherflow.com/swd/rest/stations?token= then I have correctly returned JSON, so it is unclear to me where the error lies.
The Home Assistant Weatherflow integration is running successfully in case they are mutually exclusive?
Home Assistant Green.
What version of Home Assistant Core has the issue?
core-2024.3.1
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
WeatherflowCloud
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?
No response
Additional information
No response