You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IQVIA is running into issues loading the asthma index sensors with this section of code. It looks like the issue first started appearing 7/16.
This seems to be an issue with IQVIA itself. When I use the pyiqvia client or the Python requests module to load the data myself, I receive data which is inconsistent with the rest of the endpoints. The IQVIA and Asthma Forecast websites both seem to be having issues which are possibly related. I don't believe anything can be done by HA at this time.
For the current (today) data, I receive no data under periods.
For the extended (tomorrow) data, it appears the data is both stale (today is 7/19 and it returns data from 7/15-7/19) and it is missing the Type key which lists the date.
ERROR (MainThread) [homeassistant.components.sensor] Error adding entity sensor.asthma_index_tomorrow for domain sensor with platform iqvia
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 598, in _async_add_entities
await coro
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 912, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1361, in add_to_platform_finish
await self.async_added_to_hass()
File "/usr/src/homeassistant/homeassistant/components/iqvia/__init__.py", line 156, in async_added_to_hass
self.update_from_latest_data()
File "/usr/src/homeassistant/homeassistant/components/iqvia/sensor.py", line 247, in update_from_latest_data
[period] = [p for p in data["periods"] if p["Type"] == key] # type: ignore[index]
^^^^^^^^
ValueError: not enough values to unpack (expected 1, got 0)
Additional information
No response
The text was updated successfully, but these errors were encountered:
Hey there @bachya, mind taking a look at this issue as it has been labeled with an integration (iqvia) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of iqvia 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 iqvia 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.
The problem
IQVIA is running into issues loading the asthma index sensors with this section of code. It looks like the issue first started appearing 7/16.
This seems to be an issue with IQVIA itself. When I use the pyiqvia client or the Python requests module to load the data myself, I receive data which is inconsistent with the rest of the endpoints. The IQVIA and Asthma Forecast websites both seem to be having issues which are possibly related. I don't believe anything can be done by HA at this time.
For the current (today) data, I receive no data under periods.
For the extended (tomorrow) data, it appears the data is both stale (today is 7/19 and it returns data from 7/15-7/19) and it is missing the
Type
key which lists the date.Current asthma forecast:
Returns
ValueError
due to the missing data.Extended asthma forecast:
Returns
TypeError
but is handled by the code.What version of Home Assistant Core has the issue?
2024.7.2
What was the last working version of Home Assistant Core?
2024.7.2
What type of installation are you running?
Home Assistant Container
Integration causing the issue
IQVIA
Link to integration documentation on our website
https://www.home-assistant.io/integrations/iqvia
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
ERROR (MainThread) [homeassistant.components.sensor] Error adding entity sensor.asthma_index_tomorrow for domain sensor with platform iqvia Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 598, in _async_add_entities await coro File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 912, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1361, in add_to_platform_finish await self.async_added_to_hass() File "/usr/src/homeassistant/homeassistant/components/iqvia/__init__.py", line 156, in async_added_to_hass self.update_from_latest_data() File "/usr/src/homeassistant/homeassistant/components/iqvia/sensor.py", line 247, in update_from_latest_data [period] = [p for p in data["periods"] if p["Type"] == key] # type: ignore[index] ^^^^^^^^ ValueError: not enough values to unpack (expected 1, got 0)
Additional information
No response
The text was updated successfully, but these errors were encountered: