Skip to content

Bump Nettigo Air Monitor backend library to version 5.0.0 #147812

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 1, 2025

Conversation

bieniu
Copy link
Member

@bieniu bieniu commented Jun 30, 2025

Breaking change

Proposed change

Bumps nettigo_air_monitor to version 5.0.0 to support devices with Sensor.Community firmware.

Changelog: bieniu/nettigo-air-monitor@4.1.0...5.0.0

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

Checklist

  • 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.

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 link to the changelog, or at minimum a diff between library versions is added to the PR description.

To help with the load of incoming pull requests:

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR bumps the Nettigo Air Monitor backend library to version 5.0.0 and adjusts the integration code and tests to work with the updated API. Key changes include:

  • Removal of the deprecated async_check_credentials tests and switching to async_get_mac_address/async_get_nam.
  • Updates in the configuration flow to use the new async_get_nam function.
  • Updating dependency version references in requirements and manifest files.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/components/nam/test_init.py Removed a deprecated test and updated patch targets for auth failure.
tests/components/nam/test_config_flow.py Added a fixture for async_setup_entry and updated patch calls.
tests/components/nam/init.py Updated patch targets to use async_get_mac_address instead of initialize.
requirements_test_all.txt & requirements_all.txt Updated Nettigo Air Monitor dependency version to 5.0.0.
homeassistant/components/nam/manifest.json Bumped dependency version to 5.0.0.
homeassistant/components/nam/config_flow.py Refactored to replace async_get_config/async_check_credentials with async_get_nam.
homeassistant/components/nam/init.py Removed explicit credential check during integration setup.
Comments suppressed due to low confidence (1)

homeassistant/components/nam/config_flow.py:63

  • Review the usage of async_get_nam to confirm it returns the expected NAM client instance and that subsequent references to 'nam.mac' are robust against potential changes in the upstream library API.
                nam = await async_get_nam(self.hass, self.host, {})

@@ -76,7 +55,7 @@ async def test_config_auth_failed(hass: HomeAssistant) -> None:
entry.add_to_hass(hass)

with patch(
"homeassistant.components.nam.NettigoAirMonitor.async_check_credentials",
"homeassistant.components.nam.NettigoAirMonitor.async_get_mac_address",
side_effect=AuthFailedError("Authorization has failed"),
Copy link
Preview

Copilot AI Jun 30, 2025

Choose a reason for hiding this comment

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

Ensure that the update from async_check_credentials to async_get_mac_address is applied consistently across all tests and that side_effect usage reliably simulates authentication failure as intended by the updated library API.

Suggested change
side_effect=AuthFailedError("Authorization has failed"),
side_effect=AuthFailedError("Authorization failed due to invalid credentials"),

Copilot uses AI. Check for mistakes.

@edenhaus edenhaus merged commit 11c9aa9 into home-assistant:dev Jul 1, 2025
48 checks passed
@edenhaus edenhaus added this to the 2025.7.0 milestone Jul 1, 2025
@bieniu bieniu deleted the nettigo-air-monitor-5.0.0 branch July 1, 2025 13:42
pelicarno pushed a commit to OlarmTech/home-assistant-core that referenced this pull request Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Could not connect error for Nettigo Air Monitor integration
4 participants