-
Notifications
You must be signed in to change notification settings - Fork 8
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
Implement various new Core features #668
Conversation
2 3 4 5 6 7 8 9
This reverts commit 8f151aa.
WalkthroughThe recent updates to the Plugwise integration involve refactoring the handling of configuration entries across multiple files. The primary adjustment is shifting from using Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (12)
- custom_components/plugwise/init.py (4 hunks)
- custom_components/plugwise/binary_sensor.py (3 hunks)
- custom_components/plugwise/button.py (2 hunks)
- custom_components/plugwise/climate.py (2 hunks)
- custom_components/plugwise/config_flow.py (6 hunks)
- custom_components/plugwise/const.py (1 hunks)
- custom_components/plugwise/diagnostics.py (1 hunks)
- custom_components/plugwise/entity.py (3 hunks)
- custom_components/plugwise/number.py (3 hunks)
- custom_components/plugwise/select.py (3 hunks)
- custom_components/plugwise/sensor.py (4 hunks)
- custom_components/plugwise/switch.py (3 hunks)
Files not reviewed due to errors (4)
- custom_components/plugwise/diagnostics.py (no review received)
- custom_components/plugwise/button.py (no review received)
- custom_components/plugwise/entity.py (no review received)
- custom_components/plugwise/switch.py (no review received)
Files skipped from review due to trivial changes (1)
- custom_components/plugwise/const.py
Additional comments not posted (17)
custom_components/plugwise/select.py (3)
11-11
: The import ofPlugwiseConfigEntry
aligns with the PR's objective to transition fromConfigEntry
.
30-30
: The import ofPlugwiseEntity
from.entity
is consistent with the rest of the codebase and necessary for subclassing inPlugwiseSelectEntity
.
73-73
: The function signature and the assignment ofcoordinator
have been updated to usePlugwiseConfigEntry
andentry.runtime_data
. This is in line with the PR's objectives and should ensure that the component is using the latest methods for accessing coordinator data.Also applies to: 77-77
custom_components/plugwise/number.py (2)
16-16
: The updates to the imports are consistent with the overall changes in the integration, ensuring that the components are using the updatedPlugwiseConfigEntry
and related classes.Also applies to: 28-28
66-66
: The changes to the function signature and coordinator access align with the new standards set by the integration for handling configuration entries and coordinators.Also applies to: 70-70
custom_components/plugwise/__init__.py (3)
23-23
: Introduction ofPlugwiseConfigEntry
as a type alias forConfigEntry
specialized withPlugwiseDataUpdateCoordinator
is a good practice for type clarity and safety.
26-26
: The function signature forasync_setup_entry
and the assignment ofcoordinator
toentry.runtime_data
are crucial updates that align with the new architectural decisions of usingPlugwiseConfigEntry
.Also applies to: 44-44
74-74
: Updates to theupdate_listener
andasync_unload_entry
function signatures to usePlugwiseConfigEntry
are appropriate and necessary for consistency across the integration.Also applies to: 84-85, 90-90
custom_components/plugwise/binary_sensor.py (2)
18-18
: The updated imports ensure that the binary sensor component uses the newPlugwiseConfigEntry
and accesses the coordinator correctly, aligning with the integration's updated practices.Also applies to: 35-35
93-93
: The changes in the function signature forasync_setup_entry
and the way the coordinator is accessed are in line with the changes across other components of the integration, ensuring consistency and correctness.Also applies to: 97-97
custom_components/plugwise/config_flow.py (4)
24-25
: Correct and necessary updates to imports to supportPlugwiseConfigEntry
.
231-231
: This broad exception handling should be refined to target specific exceptions for clearer error diagnostics.
260-260
: Correct inheritance to align with the updated configuration handling requirements.
291-291
: The updates to default values and handling in the configuration options are correctly implemented.Also applies to: 304-304, 310-310
custom_components/plugwise/climate.py (2)
22-22
: The import ofPlugwiseConfigEntry
and its usage in function signatures correctly align with the PR's objectives. Usingentry.runtime_data
simplifies data access patterns.Also applies to: 57-57, 61-61
22-22
: Implementation of HomeKit emulation settings usingentry.options
is a clean and effective approach, enhancing functionality.Also applies to: 57-57, 61-61
custom_components/plugwise/sensor.py (1)
31-31
: The import ofPlugwiseConfigEntry
and its usage in function signatures correctly align with the PR's objectives. Usingentry.runtime_data
simplifies data access patterns.Also applies to: 458-458, 462-462
|
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- CHANGELOG.md (1 hunks)
Additional context used
LanguageTool
CHANGELOG.md
[uncategorized] ~315-~315: Possible missing preposition found. (AI_HYDRA_LEO_MISSING_TO)
Context: ...ile P1: add support for 3-phase DMSR - Add 3-phase support, this requires P1 firmw...
[style] ~332-~332: Consider an alternative to strengthen your wording. (IMPROVEMENTS_REFINEMENTS)
Context: ...12) ### NOV 2022 [0.31.3] Thermostats: more improvements - Anna+Elga: remove cooling-switch, ad...
[uncategorized] ~434-~434: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA)
Context: .... - Add thesupported_features
as a property as they can change when the cooling-fea...
[style] ~468-~468: Consider using a different verb for a more formal wording. (FIX_RESOLVE)
Context: ...fixing connectivity issues (should also fix issues #268, #274) - Improvements in ...
[grammar] ~682-~682: The plural noun “devices” cannot be used with the article “a”. Did you mean “a new device” or “new devices”? (A_NNS)
Context: ...lt). A notification will be popup after a new devices is joined. - Improved: For quicker re...
[typographical] ~694-~694: Consider adding a comma after this introductory phrase. (AS_A_NN_COMMA)
Context: ...ion, @brefra, has joined the team. As a result we have added support for the Plugwise ...
[typographical] ~707-~707: Consider adding a comma here. (TO_THAT_COMMA)
Context: ... the HA Core Plugwise component. Due to this it behaves exactly as the HA Core Plugw...
[style] ~709-~709: For conciseness, consider replacing this expression with an adverb. (AT_THE_MOMENT)
Context: ...tures and improvements! PLEASE NOTE: ~~at the moment you will need to remove the existing Co...
[style] ~709-~709: For conciseness, consider replacing this expression with an adverb. (AT_THE_MOMENT)
Context: ...all this beta custom_component. This is at the moment also needed when you want to return to ...
Additional comments not posted (1)
CHANGELOG.md (1)
7-7
: This entry succinctly captures the ongoing efforts. Ensure that specific features and fixes are detailed in future releases for better tracking.
All changes:
entry.runtime_data
as in Core Plugwise.update_listener
.config_entries
.Summary by CodeRabbit
Refactor
PlugwiseConfigEntry
usage across multiple components, simplifying setup and ensuring consistency.Documentation
CHANGELOG.md
to reflect the ongoing implementation of new Core features for version0.51.3
.