Static routes support and critical lifecycle issues fixed - #119
Merged
Conversation
- Introduced a new StaticRoute model for managing static network routes. - Enhanced the coordinator to handle static route updates and retrieval. - Added a switch entity for static routes to enable/disable them within Home Assistant. - Updated the README to include static routes in the integration documentation. - Implemented triggers for monitoring static route changes. - Added unit tests for static routes functionality, ensuring robust integration and error handling.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New
Adds support for Static Routes. UNR will now create and maintain switches for each static route policy you have defined. fixes #101
Fixes
Network and profile switches could accidentally be removed from Home Assistant after toggling an unrelated rule. This was a bug introduced the v4.0.0 release. fixes #118
This pull request adds support for static routes to the UniFi Network Rules integration, enabling monitoring and management of static network routing configurations. The changes update documentation, constants, API endpoint definitions, and the data coordinator to handle static routes alongside existing rule types.
Static Route Support
README.md. [1] [2] [3] [4] [5]api_endpoints.pyand exposed them in constants (API_ENDPOINT_STATIC_ROUTES,API_ENDPOINT_STATIC_ROUTE_DETAIL,API_PATH_STATIC_ROUTES,API_PATH_STATIC_ROUTE_DETAIL). [1] [2] [3] [4] [5] [6]Coordinator Enhancements
static_routescollection, included static route checks in change detection and deletion logic, and ensured static routes are fetched, updated, and preserved during authentication failures or API errors. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]