Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
757fa1b
Format tests
eXPerience83 Nov 24, 2025
3a79e87
Restrict workflow push triggers to main
eXPerience83 Nov 26, 2025
edce7a9
Expand workflow push branches
eXPerience83 Nov 26, 2025
7aca5ee
Install package during test workflow
eXPerience83 Nov 26, 2025
d6d555a
Add happy path setup/unload test
eXPerience83 Nov 26, 2025
01efaab
Fix packaging metadata and translation key collection
eXPerience83 Nov 26, 2025
6320a0c
Lower Python floor to 3.13
eXPerience83 Nov 26, 2025
1b5d2ca
Gate package install in tests workflow
eXPerience83 Nov 26, 2025
b6eba92
Raise Python requirement to 3.14
eXPerience83 Nov 26, 2025
386ea09
Clarify Python floor note in pyproject
eXPerience83 Nov 26, 2025
4ee12b5
Adjust test stubs for async session and utcnow
eXPerience83 Nov 26, 2025
995b325
Defer per-day cleanup until coordinator refresh
eXPerience83 Nov 27, 2025
953b775
Add SequenceSession guard and bump version 1.8.4
eXPerience83 Nov 27, 2025
d49ea54
Add metadata consistency test and fix manifest JSON
eXPerience83 Nov 27, 2025
ca1a270
Add renovate.json
renovate[bot] Nov 27, 2025
c70a15f
Update changelog for 1.8.4 changes
eXPerience83 Nov 28, 2025
ce8a859
Fix config flow stub session
eXPerience83 Nov 28, 2025
5b066c7
Improve SequenceSession exhaustion message
eXPerience83 Nov 28, 2025
02c4a16
Merge pull request #37 from eXPerience83/codex/extract-error-keys-fro…
eXPerience83 Nov 28, 2025
8b5fbf1
Merge pull request #38 from eXPerience83/renovate/configure
eXPerience83 Nov 28, 2025
ea6e376
Update actions/checkout action to v6
renovate[bot] Nov 28, 2025
4a75588
Update actions/setup-python action to v6
renovate[bot] Nov 28, 2025
449580b
Merge pull request #39 from eXPerience83/renovate/actions-checkout-6.x
eXPerience83 Nov 28, 2025
80b69c3
Merge pull request #40 from eXPerience83/renovate/actions-setup-pytho…
eXPerience83 Nov 28, 2025
9aa3575
Clarify AST test failures
eXPerience83 Nov 28, 2025
dc7eed0
Merge pull request #42 from eXPerience83/codex/harden-pollen-levels-i…
eXPerience83 Nov 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.event.inputs.target_branch || github.ref }}

- name: Setup Python 3.14 (latest patch)
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.14"
cache: "pip"
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/hassfest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Validate with hassfest

on:
push:
branches: [main, master]
pull_request:
schedule:
- cron: "0 0 * * *"
Expand All @@ -17,7 +18,7 @@ jobs:
steps:
# Checkout so hassfest can read manifests and structure
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v6

# Official hassfest action (Home Assistant recommends @master)
- name: Run hassfest
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Lint

on:
push:
branches: [main, master]
pull_request:
workflow_dispatch:
inputs:
Expand All @@ -22,13 +23,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.event.inputs.ref || github.ref }}

- name: Setup Python 3.14 (latest patch)
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.14"
cache: "pip"
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
python-version: ["3.13", "3.14"]
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
Expand All @@ -37,6 +37,13 @@ jobs:
python -m pip install -r requirements_test.txt
fi

- name: Install package
if: ${{ matrix.python-version >= '3.14' }}
run: |
python -m pip install .

- name: Run tests
run: |
pytest -q
env:
PYTHONPATH: .
1 change: 1 addition & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Validate with HACS

on:
push:
branches: [main, master]
pull_request:
schedule:
- cron: "0 0 * * *"
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
# Changelog
## [1.8.4] - 2025-11-27
### Fixed
- Added a bounds check to the sensor test SequenceSession helper so exhausting the
fake response list raises a clear AssertionError instead of an IndexError.
- Added metadata consistency tests to keep the package name/version aligned with
the manifest and catch missing fields early in CI.
- Corrected the manifest JSON formatting so metadata parses cleanly without
trailing separators.

## [1.8.3] - 2025-11-24
### Fixed
- Stop logging coordinate values through the invalid-coordinate exception message in the config
Expand Down
2 changes: 1 addition & 1 deletion custom_components/pollenlevels/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ async def _async_validate_input(
errors["base"] = "cannot_connect"
except Exception as err: # defensive
_LOGGER.exception(
"Unexpected error: %s",
"Unexpected error in Pollen Levels config flow while validating input: %s",
redact_api_key(err, user_input.get(CONF_API_KEY)),
)
errors["base"] = "cannot_connect"
Expand Down
18 changes: 9 additions & 9 deletions custom_components/pollenlevels/manifest.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"domain": "pollenlevels",
"name": "Pollen Levels",
"codeowners": ["@eXPerience83"],
"config_flow": true,
"documentation": "https://github.com/eXPerience83/pollenlevels",
"integration_type": "service",
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/eXPerience83/pollenlevels/issues",
"version": "1.8.3"
"domain": "pollenlevels",
"name": "Pollen Levels",
"codeowners": ["@eXPerience83"],
"config_flow": true,
"documentation": "https://github.com/eXPerience83/pollenlevels",
"integration_type": "service",
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/eXPerience83/pollenlevels/issues",
"version": "1.8.4"
}
14 changes: 9 additions & 5 deletions custom_components/pollenlevels/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,6 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
allow_d1 = create_d1 and forecast_days >= 2
allow_d2 = create_d2 and forecast_days >= 3

# Proactively remove stale D+ entities from the Entity Registry
await _cleanup_per_day_entities(
hass, config_entry.entry_id, allow_d1=allow_d1, allow_d2=allow_d2
)

coordinator = PollenDataUpdateCoordinator(
hass=hass,
api_key=api_key,
Expand All @@ -236,6 +231,11 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
_LOGGER.warning(message)
raise ConfigEntryNotReady(message)

# Proactively remove stale D+ entities from the Entity Registry
await _cleanup_per_day_entities(
hass, config_entry.entry_id, allow_d1=allow_d1, allow_d2=allow_d2
)

hass.data.setdefault(DOMAIN, {})[config_entry.entry_id] = coordinator

sensors: list[CoordinatorEntity] = []
Expand Down Expand Up @@ -463,6 +463,8 @@ async def _async_update_data(self):
await asyncio.sleep(delay)
continue
msg = redact_api_key(err, self.api_key)
if not msg:
msg = "Google Pollen API call timed out"
raise UpdateFailed(f"Timeout: {msg}") from err

except aiohttp.ClientError as err:
Expand All @@ -478,6 +480,8 @@ async def _async_update_data(self):
await asyncio.sleep(delay)
continue
msg = redact_api_key(err, self.api_key)
if not msg:
msg = "Network error while calling the Google Pollen API"
raise UpdateFailed(msg) from err

except Exception as err: # Keep previous behavior for unexpected errors
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# - CI: pip install "black==<desired black version>" "ruff==<desired ruff version>"

[project]
name = "pollenlevels"
version = "1.8.4"
# Enforce the runtime floor aligned with upcoming HA Python 3.14 images.
requires-python = ">=3.14"

Expand Down
6 changes: 6 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended"
]
}
Loading
Loading