-
Notifications
You must be signed in to change notification settings - Fork 26
Add Websocket "config entries" methods #213
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
base: dev
Are you sure you want to change the base?
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()`" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
|
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:
|
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