-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
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
Conversation
There was a problem hiding this 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"), |
There was a problem hiding this comment.
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.
side_effect=AuthFailedError("Authorization has failed"), | |
side_effect=AuthFailedError("Authorization failed due to invalid credentials"), |
Copilot uses AI. Check for mistakes.
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
Additional information
Could not connect
error for Nettigo Air Monitor integration #146877Checklist
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: