Skip to content

Skip sensors without cloud samples - #1

Merged
sstallion merged 1 commit into
sstallion:masterfrom
econstantin:fix/skip-sensors-without-samples
Oct 19, 2026
Merged

sstallion merged 1 commit into
sstallion:masterfrom
econstantin:fix/skip-sensors-without-samples

Conversation

@econstantin

Copy link
Copy Markdown
Contributor

When a sensor is listed by the sensors endpoint but omitted from the samples response, async_get_data() raises KeyError and the Home Assistant integration cannot complete setup. An empty sample list similarly raises IndexError.

Skip only sensors with a missing or empty sample list and continue processing the remaining readings. A sensor is included automatically on a later update once samples become available. API failures still propagate normally.

Adds regression tests for missing keys, empty lists, healthy readings in a mixed response, resumed samples, and API failures. The same missing-key failure was reproduced against 1.3.2, and this sample-handling change is running successfully in a local Home Assistant override.

Validation:

  • python -m unittest discover -s tests -v: 3 tests passed on Python 3.13.12 and 3.14.6.
  • python -m build --no-isolation: sdist and wheel built successfully.

A patch release after merging would allow Home Assistant to adopt the fix through a normal dependency update.

@sstallion sstallion self-assigned this Oct 19, 2026
@sstallion

Copy link
Copy Markdown
Owner

Thanks for the fix!

@sstallion
sstallion merged commit e7aa09f into sstallion:master Oct 19, 2026
2 checks passed
@econstantin
econstantin deleted the fix/skip-sensors-without-samples branch October 22, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants