-
Notifications
You must be signed in to change notification settings - Fork 5
feat: refactor of codebase #76
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
Draft
cryptk
wants to merge
21
commits into
main
Choose a base branch
from
refactor_abstracted_interface
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
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
Owner
cryptk
commented
Oct 27, 2025
- provide abstraction layer within library
- allows interacting with omnilogic in a more pythonic way
- provide abstraction layer within library - allows interacting with omnilogic in a more pythonic way
3cb6294 to
5d1029f
Compare
- Create EquipmentDict collection supporting lookup by name or system_id - Replace list[Equipment] with EquipmentDict in Backyard and Bow classes - Add validation for equipment identifiers and duplicate name warnings - Refactor OmniEquipment to call update() from __init__ for proper hook execution - Add _update_equipment() methods to Backyard and Bow for child equipment updates - Update items() to return (system_id, name, item) tuples This enables intuitive equipment access: backyard.bow["Pool"] or backyard.bow[3] while allowing compatibility with iteration and length operations.
4f20fbe to
086426f
Compare
- Add OmniEquipmentNotReadyError for equipment in non-ready states - Add OmniEquipmentNotInitializedError for uninitialized equipment - Add OmniConnectionError for controller communication failures - Export all exceptions in __init__.py for easy importing - Replace ValueError with OmniEquipmentNotInitializedError in ColorLogicLight methods All exceptions inherit from OmniLogicLocalError base class and include comprehensive docstrings with usage examples.
…system - Implement @auto_refresh decorator that automatically refreshes equipment state after control methods - Add update_if_older_than() with asyncio.Lock to prevent redundant API calls - Refactor equipment classes to pass OmniLogic instance instead of OmniLogicAPI for explicit dependency injection
- Remove complex automatic refresh system in favor of explicit state tracking. - Add dirty flags to OmniLogic and update refresh() with flexible if_dirty/if_older_than/force parameters for better user control.
163b9b9 to
68da82d
Compare
…ilter and Pump - Filter includes run_preset_speed method for LOW/MEDIUM/HIGH presets - All MSPConfig and Telemetry attributes exposed as properties
2727db9 to
864e854
Compare
- Also added mspconfig and telemetry type hints to all equipment classes
- @Property methods for accessing equipment by type: all_lights, all_filters, etc - Add get_equipment_by_name() and get_equipment_by_id() for searching across all equipment.
…hensive status decoding - Add telemetry properties and bitmask decoding for Chlorinator status, alerts, and errors - Implement CSAD properties for pH/ORP monitoring and chemical dispensing control - Add computed properties (is_on, is_generating, is_ready, has_alert, etc.) with detailed docstrings - Clarify ORP sensor usage: primary control for chlorinator, monitoring only for CSAD
eaf4a60 to
539f541
Compare
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.