Skip to content

Add new Aqvify integration#172936

Merged
joostlek merged 23 commits into
home-assistant:devfrom
nordicopen:aqvify
Jun 8, 2026
Merged

Add new Aqvify integration#172936
joostlek merged 23 commits into
home-assistant:devfrom
nordicopen:aqvify

Conversation

@astrandb

@astrandb astrandb commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Proposed change

Add new integration for Aqvify water well and tank level meters. These devices communicates with 4G directly to the cloud and have no contact with LAN.

This integration depends on https://github.com/astrandb/pyaqvify

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request: Aqvify integration home-assistant.io#45734
  • Link to developer documentation pull request:
  • Link to frontend pull request:

Checklist

  • I understand the code I am submitting and can explain how it works.
  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies a diff between library versions and ideally a link to the changelog/release notes is added to the PR description.

To help with the load of incoming pull requests:

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR adds a new Aqvify integration to Home Assistant, enabling cloud-polling-based monitoring of Aqvify water measurement devices via the pyaqvify library.

Changes:

  • Adds the full Aqvify integration scaffold: config flow, coordinator, sensor platform, base entity, constants, manifest, strings, icons, and quality scale configuration.
  • Registers the integration in generated files (integrations.json, config_flows.py, CODEOWNERS, requirements_all.txt).
  • Adds config flow tests with error-handling parametrization and a test fixture in conftest.py.

Reviewed changes

Copilot reviewed 15 out of 17 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
homeassistant/components/aqvify/init.py Integration setup and teardown entry points
homeassistant/components/aqvify/config_flow.py Config flow with API key validation
homeassistant/components/aqvify/coordinator.py Data update coordinator for fetching device data
homeassistant/components/aqvify/entity.py Base entity class with device info
homeassistant/components/aqvify/sensor.py Sensor platform for meter value and water level
homeassistant/components/aqvify/const.py Domain constant
homeassistant/components/aqvify/manifest.json Integration manifest
homeassistant/components/aqvify/strings.json UI strings and translations
homeassistant/components/aqvify/icons.json Entity icon definitions
homeassistant/components/aqvify/quality_scale.yaml Quality scale checklist
homeassistant/generated/integrations.json Register integration metadata
homeassistant/generated/config_flows.py Register config flow
requirements_all.txt Add pyaqvify dependency
CODEOWNERS Assign code ownership
tests/components/aqvify/init.py Test package init
tests/components/aqvify/conftest.py Test fixtures
tests/components/aqvify/test_config_flow.py Config flow tests

Comment thread homeassistant/components/aqvify/coordinator.py Outdated
Comment thread homeassistant/components/aqvify/coordinator.py Outdated
Comment thread homeassistant/components/aqvify/coordinator.py Outdated
Comment thread homeassistant/components/aqvify/entity.py
Comment thread homeassistant/components/aqvify/entity.py Outdated
Comment thread homeassistant/components/aqvify/config_flow.py Outdated
Comment thread homeassistant/components/aqvify/sensor.py Outdated
Comment thread homeassistant/components/aqvify/sensor.py Outdated
Copilot AI review requested due to automatic review settings June 3, 2026 18:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 17 changed files in this pull request and generated 4 comments.

Comment thread homeassistant/components/aqvify/coordinator.py Outdated
Comment thread homeassistant/components/aqvify/config_flow.py Outdated
Comment thread homeassistant/components/aqvify/quality_scale.yaml Outdated
Comment thread tests/components/aqvify/test_config_flow.py Outdated
Copilot AI review requested due to automatic review settings June 4, 2026 08:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 17 changed files in this pull request and generated 3 comments.

Comment thread homeassistant/components/aqvify/coordinator.py Outdated
Comment thread homeassistant/components/aqvify/coordinator.py Outdated
Comment thread homeassistant/components/aqvify/coordinator.py Outdated
Copilot AI review requested due to automatic review settings June 4, 2026 12:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 19 out of 21 changed files in this pull request and generated 6 comments.

Comment thread tests/components/aqvify/__init__.py Outdated
Comment thread tests/components/aqvify/conftest.py Outdated
Comment thread tests/components/aqvify/conftest.py Outdated
Comment thread tests/components/aqvify/conftest.py Outdated
Comment thread homeassistant/components/aqvify/strings.json Outdated
Comment thread tests/components/aqvify/test_init.py Outdated
Comment thread homeassistant/components/aqvify/__init__.py Outdated
Comment thread homeassistant/components/aqvify/config_flow.py Outdated
Comment thread homeassistant/components/aqvify/config_flow.py Outdated
Comment thread homeassistant/components/aqvify/config_flow.py Outdated
Comment thread homeassistant/components/aqvify/coordinator.py Outdated
Comment thread homeassistant/components/aqvify/coordinator.py Outdated
Comment thread homeassistant/components/aqvify/sensor.py Outdated
Copilot AI review requested due to automatic review settings June 4, 2026 13:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 19 out of 21 changed files in this pull request and generated 3 comments.

Comment thread homeassistant/components/aqvify/config_flow.py Outdated
Comment thread tests/components/aqvify/__init__.py Outdated
Comment thread homeassistant/components/aqvify/sensor.py
@astrandb astrandb marked this pull request as ready for review June 4, 2026 13:56
Copilot AI review requested due to automatic review settings June 4, 2026 18:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 23 changed files in this pull request and generated 2 comments.

Comment thread tests/components/aqvify/test_init.py Outdated
Comment thread tests/components/aqvify/test_config_flow.py Outdated
Copilot AI review requested due to automatic review settings June 5, 2026 06:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 23 changed files in this pull request and generated 2 comments.

Comment on lines +4 to +6
'aliases': list([
None,
]),

_LOGGER = logging.getLogger(__name__)

UPDATE_INTERVAL = timedelta(seconds=60)
Copilot AI review requested due to automatic review settings June 5, 2026 09:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 24 out of 26 changed files in this pull request and generated 3 comments.

Comment on lines +21 to +29
_api = AqvifyAPI(entry.data[CONF_API_KEY], websession=async_get_clientsession(hass))
try:
await _api.async_get_account_id()
except AqvifyAuthException as err:
raise ConfigEntryAuthFailed(f"Invalid Aqvify API key: {err}") from err
except Exception as err:
raise ConfigEntryNotReady(f"Failed to connect to Aqvify API: {err}") from err

coordinator = AqvifyCoordinator(hass, entry)
Comment thread homeassistant/components/aqvify/coordinator.py
Comment thread homeassistant/components/aqvify/coordinator.py
Comment thread homeassistant/components/aqvify/__init__.py Outdated
Comment thread homeassistant/components/aqvify/diagnostics.py Outdated
Comment thread homeassistant/components/aqvify/sensor.py Outdated
Comment thread tests/components/aqvify/conftest.py Outdated
Comment thread tests/components/aqvify/conftest.py Outdated
Comment thread tests/components/aqvify/test_config_flow.py
Comment thread tests/components/aqvify/test_config_flow.py Outdated
Comment thread tests/components/aqvify/test_config_flow.py Outdated
Comment thread tests/components/aqvify/test_config_flow.py Outdated
Comment thread tests/components/aqvify/test_init.py Outdated
@home-assistant home-assistant Bot marked this pull request as draft June 8, 2026 08:31
@home-assistant

home-assistant Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

Copilot AI review requested due to automatic review settings June 8, 2026 11:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 24 out of 26 changed files in this pull request and generated 3 comments.

Comment on lines +61 to +75
device_data = {}
for device in devices.devices.values():
try:
device_key = str(device.device_key)
device_data[
device_key
] = await self.api_client.async_get_device_latest_data(device_key)
except ClientResponseError as err:
raise UpdateFailed(
f"Error communicating with Aqvify API: {err}"
) from err
except TimeoutError as err:
raise UpdateFailed(
f"Timeout communicating with Aqvify API: {err}"
) from err
# Platinum
async-dependency: todo
inject-websession: todo
strict-typing: todo
Comment on lines +4 to +6
'aliases': list([
None,
]),
@astrandb astrandb marked this pull request as ready for review June 8, 2026 12:35
@home-assistant home-assistant Bot requested a review from joostlek June 8, 2026 12:35
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

Check requirements

⚠️ Some checks require attention — see the details below.

Package Old New No Advisories Not Yanked Repo Public CI Upload Release Pipeline PR Link Async Safe
pyaqvify 0.0.8
📦 pyaqvify: 0.0.8
  • No Advisories: ✅ No active advisories reported by PyPI for version 0.0.8.
  • Not Yanked: ✅ Version 0.0.8 is a live (non-yanked) release.
  • Repo Public: ✅ https://github.com/astrandb/pyaqvify is publicly accessible.
  • CI Upload: ✅ Trusted Publisher attestation found (GitHub).
  • Release Pipeline: ✅ OIDC via Trusted Publisher attestation (GitHub); automated CI upload verified by PyPI.
  • PR Link: ❌ PR description must link to the source repository at https://github.com/astrandb/pyaqvify. A PyPI page link is not sufficient.
  • Async Safe: ✅ No blocking calls found; all network I/O is performed via aiohttp's async ClientSession.

Generated by Check requirements (AW) · sonnet46 746.4K ·

@joostlek joostlek merged commit b8bdd2c into home-assistant:dev Jun 8, 2026
43 of 44 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants