Add Websocket "config entries" methods#213
Open
mj23000 wants to merge 13 commits intoGrandMoff100:devfrom
Open
Add Websocket "config entries" methods#213mj23000 wants to merge 13 commits intoGrandMoff100:devfrom
mj23000 wants to merge 13 commits intoGrandMoff100:devfrom
Conversation
1405327 to
f619b30
Compare
f619b30 to
6156007
Compare
fb07c38 to
9292ae2
Compare
| @override | ||
| def from_json(cls, json: Union[dict[str, JSONType], Any, None], **kwargs) -> Self: | ||
| raise ValueError( | ||
| f"`{cls.__name__}` does not support `from_json()`. Use `from_json_with_client()`" |
Owner
There was a problem hiding this comment.
This is a nifty idea to add from_json_with_client making the dependence on a client more explicit. I like it.
47fc054 to
e445ecd
Compare
1573d86 to
c17206f
Compare
df11af5 to
940e60a
Compare
Author
|
I've added the missing method and testing for the new code. |
940e60a to
b2bc5cb
Compare
b2bc5cb to
e5101b3
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #213 +/- ##
==========================================
+ Coverage 97.44% 97.63% +0.18%
==========================================
Files 25 26 +1
Lines 1647 1864 +217
==========================================
+ Hits 1605 1820 +215
- Misses 42 44 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Add most of the Websocket methods available in the config_entries.py file.
Missing from this PR so far:
Add testing for the newly added methodsAddconfig_entries/subscribemethodget_entry_subentriesanddelete_entry_subentrywork as intendedThis PR also tweaks how the
from_json()methods are used, so some feedback would be appreciated.Kind regards