-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: Set NotImplemented from device schema. #31
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
For coverage on all of the attribute setters and the translation from info dict to the attributes.
Apparently I cannot trigger it. I think it is also missing a pip install -e .
- documenting reverse engineering the fields in the device configuration json. -add senml sensor pack parsing.
If a sensor is not implemented by the device, then DeviceAws sets it to NotImplemented. If a sensor is implemented but its value is unavailable, sets it to None. (the second case, is for example when H35i's fan is in standby, then h and t are unavaiable)
rainwoodman
changed the title
Set NotImplemented from device schema.
feat: Set NotImplemented from device schema.
Dec 11, 2024
rainwoodman
commented
Dec 11, 2024
rainwoodman
commented
Dec 11, 2024
dahlb
reviewed
Dec 11, 2024
dahlb
reviewed
Dec 11, 2024
dahlb
reviewed
Dec 11, 2024
Also add the forgotten unit test file for it.
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.
If a control/sensor is not supported by the device, then set the corresponding attribute to NotImplemented.
#25 #30
This PR included the unit test PR test: Draft test example. #27
A major change: added a ir_aws.py file that solidified the reverse engineering of the device info response. (ir == intermediate representation).
Some upgrades to the Python 3.12 new typing syntax. I don't think we run type checkers on the source code yet, so this may actually be broken but at least the unit tests still runs fine. We can add a type checker later (I have not caught up with how to set up type checkers myself).
Unit tests for H35i and T10i are updated, since I already have the golden device info files.
added a new 'standby' attribute with the intention of deprecating the running attribute -- this way translation to HA semantics can be centralized to ha_blueair, and we can keep the blueair_api module closer to the actual blueair api.