Add AirGradient measurement interval select - #180319
Conversation
|
Hey there @airgradienthq, @joostlek, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
There was a problem hiding this comment.
Pull request overview
Adds a configuration select for supported AirGradient Go measurement intervals.
Changes:
- Defines supported interval options and device capability.
- Adds localized labels.
- Covers entity metadata and writes with tests.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
homeassistant/components/airgradient/const.py |
Adds the Go capability. |
homeassistant/components/airgradient/select.py |
Implements the interval select. |
homeassistant/components/airgradient/strings.json |
Adds option translations. |
tests/components/airgradient/test_select.py |
Tests interval writes. |
tests/components/airgradient/snapshots/test_select.ambr |
Records entity state and metadata. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
justanotherariel
left a comment
There was a problem hiding this comment.
Shouldn't this be a number entity instead? The API can report any number in between too, so we need to make sure to at least handle this too.
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Breaking change
None.
Proposed change
Add a measurement interval configuration select for AirGradient Go devices. The select exposes the curated intervals supported by the device firmware, from 3 seconds through 1 hour.
Validation
uv run --no-sync pytest tests/components/airgradient --cov=homeassistant.components.airgradient --cov-report=term-missing(85 passed, 174 snapshots, 100% coverage)Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running:
python3 -m script.gen_requirements_all.To help with the load of incoming pull requests: