Conversation
… updates (#74) - Enhance UniFi Network Rules integration with CQRS-style operation tracking and delayed verification - Introduced a new mechanism in `coordinator.py` to track Home Assistant initiated operations, attempting to prevent redundant refreshes. - Added delayed verification logic in `switch.py` to ensure state consistency after operations. - Incremented version in `manifest.json` to 3.1.0 to reflect these enhancements. - Revised the README.md to enhance clarity on integration features and usage, including a new section on advanced automations. - Updated the features list to provide a more detailed overview of supported rules and configurations. - Removed the `reset_rate_limit` service from services.yaml and its implementation in system_services.py to streamline functionality. - Remove `reset_rate_limit` service from the integration to streamline functionality and improve code clarity. Updated related imports and constants accordingly. - Revised the README.md to clarify the limitations of the automation UI and provide updated YAML configuration examples. - Enhanced the trigger.py file by removing unused code and improving the validation process for trigger configurations. - Incremented the version in manifest.json to 3.1.0 to reflect these updates. - Modified trigger.py to handle asynchronous action execution more effectively, ensuring proper task scheduling. - Enhanced logging for trigger events to improve debugging and monitoring capabilities. - Updated the security monitoring section to clarify notification creation for firewall policy changes. - Added a new automation example for handling UniFi policy changes with detailed notification messages. - Revised the VPN connection monitoring section to include a specific client reconnection automation and improved messaging for connection status notifications.
- Enhanced the `async_toggle_rule`, `async_delete_rule`, and `async_bulk_update_rules` functions to handle VPN clients and servers. - Introduced helper functions for toggling and deleting VPN configurations. - Updated rule type handling to include VPN clients and servers in the relevant operations, improving the integration's capabilities.
Add support for VPN clients and servers in rule management service
sirkirby
marked this pull request as ready for review
July 3, 2025 13:22
Owner
Author
|
Updated the rules service to properly support VPN switches and use the API queue for better rate limit management. |
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.
This pull request updates the
README.mdfile to improve clarity, reorganize content, and enhance automation examples, while also introducing a minor code update in theconst.pyandcoordinator.pyfiles. The changes focus on improving user guidance for the UniFi Network Rules integration and refining internal operation tracking.Documentation Improvements:
README.md).README.md) [1] [2] [3].README.md).Automation Enhancements:
typeandtriggerkeys with a unified structure (README.md) [1] [2].README.md) [1] [2].Codebase Updates:
SWITCH_DELAYED_VERIFICATION_SLEEP_SECONDSconstant toconst.pyto introduce a delay for switch state verification (custom_components/unifi_network_rules/const.py)._ha_initiated_operationsincoordinator.pyto track operations initiated by Home Assistant, preventing redundant refreshes and race conditions (custom_components/unifi_network_rules/coordinator.py).