-
Notifications
You must be signed in to change notification settings - Fork 0
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
resolves #7 support delta pro #19
Merged
Merged
Conversation
This file contains 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
Introduced a new module to handle Delta Pro serial number validation using Zod. This includes a schema that enforces serial numbers to start with "DCABZ" and type-checking utilities.
Created schemas for setting various DeltaPro configurations like X-Boost switch, car charger, charge level, discharge level, car input current, beep switch, screen brightness, and smart generator auto-on. Each schema includes detailed validation based on the corresponding command parameters.
Introduced schemas for various deltaPro set commands, including smart generator auto off, unit timeout, screen timeout, AC standby time, AC charging settings, PV charging type, and bypass AC auto start.
This commit introduces a new file, `getProperties.ts`, defining a comprehensive schema using zod for DeltaPro properties. It includes numerous fields related to system metrics, health status, and configurations, each with appropriate data type validation.
This commit introduces the export for the deltaPro schema in the index file. This ensures that deltaPro can be used throughout the application as part of the schemas package. Other exports remain unchanged.
Introduced Delta Pro class with validation for serial numbers. Updated DeviceFactory and respective tests to ensure proper creation and handling of Delta Pro instances.
…ptional. Updated the 'mppt.reserved' and 'pd.brightnessLevel' fields to be optional in the deltaPro schema. Original data did not include these fields.
Introduced methods `enableXboost` and `enableCharger` to the DeltaPro class. Updated tests for the new methods and included additional validation for API response parsing.
Implemented `setMaxChargeLevel` method in DeltaPro to specify maximum charge level. Added corresponding test to ensure proper functionality and schema validation.
Implemented new methods for various device settings like AC charging power, beep, screen timeout, and smart generator thresholds. Updated corresponding tests to ensure these methods work correctly and included renaming `setMaxChargeLevel` to `setChargeLevel`.
Included detailed usage examples for the Delta Pro device in the TypeScript code and updated the README accordingly. These changes demonstrate how to enable features and set various configurations using the client library.
Deleted redundant changeset files and consolidated updates into a single changeset for the addition of delta pro support. This ensures cleaner version tracking and avoids duplicate entries.
Closed
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.
Adds delta pro support by providing a dedicated class