-
-
Notifications
You must be signed in to change notification settings - Fork 6
Rework to simplify LED switches and new device_changed trigger #88
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
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
8afc6da
Increment version to 3.1.1 in manifest.json and update device payload…
sirkirby b7bbb3d
Merge pull request #81 from sirkirby/net-92-led-compatibility
sirkirby 32930a5
Refactor LED toggle functionality in network.py to improve compatibil…
sirkirby 5a2c9d4
Merge pull request #82 from sirkirby/led-switch-compatibility
sirkirby 54d3500
Update coding practices and add project overview documentation
sirkirby 08765ef
Add device state change detection and trigger support
sirkirby ac6a6ab
Revert "Merge pull request #82 from sirkirby/led-switch-compatibility"
sirkirby 246bb69
Revert "Merge pull request #81 from sirkirby/net-92-led-compatibility"
sirkirby a15452d
Add device change trigger support in triggers.yaml
sirkirby 818a44d
Merge pull request #85 from sirkirby/device-triggers
sirkirby 8f65668
Simplying LED api integration and state managmenet (#86)
sirkirby File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # Project Overview | ||
|
|
||
| This project is a custom home assistant integration to manage UniFi Network policies and rules. It is designed to provide a seamless and efficient way to manage and automate your home network policies and rules within home assistant. | ||
|
|
||
| ## Project Structure | ||
|
|
||
| The project is organized into the following directories: | ||
|
|
||
| - `custom_components/unifi_network_rules`: The custom home assistant integration | ||
| - - `udm`: Code for interacting with the Unifi Network API | ||
| - - `models`: data models | ||
| - - `services`: custom services | ||
| - - `helpers`: helper functions | ||
| - - `utils`: utility functions | ||
| - - `manifest.json`: The manifest for the integration. | ||
| - `tests`: The test suite. | ||
| - `docs`: The documentation. | ||
|
|
||
| ## Libraries and Frameworks | ||
|
|
||
| - `aiounifi`: The library for interacting with the Unifi Network API | ||
| - `homeassistant`: The library for interacting with the Home Assistant API | ||
| - python 3.13 | ||
|
|
||
| ## Coding Standards | ||
|
|
||
| - Always keep the code DRY for testability and separation of concerns | ||
| - Prefer modern idiomatic Python 3.13 and open source conventions, Leverage type hints, use CONST over hard coded strings | ||
| - Prioritize native Home Assistant libraries, like aiounifi, and other core capabilities to respect available resources and to avoid building duplicate functionality. Leverage the latest Home Assistant documentation. | ||
| - Diagnostics enabled for observability and debugging should be targeted, respecting the resources of the system | ||
| - All data retrieved and stored from the API should be typed, if not supplied by aiounifi, then a custom type should be created | ||
| - When designing a new feature, prefer elegant solutions using established best practices and patterns. | ||
| - When fixing a problem or bug, avoid treating the symptom, look for the root cause. | ||
| - Details matter, ensure to always preserve existing functionality unless otherwise instructed. | ||
| - KISS |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,5 +15,5 @@ | |
| "aiounifi>=82.0.0", | ||
| "orjson>=3.8.0" | ||
| ], | ||
| "version": "3.1.0" | ||
| "version": "3.2.0" | ||
| } | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.