-
Notifications
You must be signed in to change notification settings - Fork 8
Bump plugwise to v1.7.7 and adapt #892
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
Conversation
|
Warning Rate limit exceeded@bouwew has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 1 minutes and 36 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughThis update refactors attribute access throughout the Plugwise integration, changing references from flat API attributes (e.g., Changes
Sequence Diagram(s)sequenceDiagram
participant HA as Home Assistant
participant Plugwise as Plugwise Integration
participant API as Plugwise API
participant Smile as Smile Device
HA->>Plugwise: Initialize integration
Plugwise->>API: Access smile object (e.g., smile.name, smile.model)
API->>Smile: Retrieve nested attributes
Smile-->>API: Return requested properties
API-->>Plugwise: Provide nested property values
Plugwise-->>HA: Complete setup with updated device info
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
✨ Finishing Touches
🧪 Generate Unit Tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration 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.
❌ Error while testing for Development HA-core:
✔️ Success: No problem with testing against released HA-core.
|
Weird, action states: Successfully tested against dev HA-core ... |
to avoid smile.smile.x naming
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.
❌ Error while testing for Development HA-core:
✔️ Success: No problem with testing against released HA-core.
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
♻️ Duplicate comments (7)
tests/components/plugwise/conftest.py (7)
127-150: See previous comment – sameapi.smileduplication applies here.
159-176: Duplication ofapi.smileconstruction – refer to earlier suggestion.
185-202: Duplication ofapi.smileconstruction – refer to earlier suggestion.
211-228: Duplication ofapi.smileconstruction – refer to earlier suggestion.
237-253: Duplication ofapi.smileconstruction – refer to earlier suggestion.
263-279: Duplication ofapi.smileconstruction – refer to earlier suggestion.
289-305: Duplication ofapi.smileconstruction – refer to earlier suggestion.
🧹 Nitpick comments (1)
tests/components/plugwise/conftest.py (1)
105-117: Nice refactor – but extract the repeatedsmilemock constructionSwitching to a nested
api.smileobject aligns tests with the integration changes – good!
However, the same block (api.smile = Munch(); …) is duplicated in every fixture. Consider a tiny helper:+# tests/components/plugwise/helpers.py +from munch import Munch + +def build_smile(**attrs): + smile = Munch() + for k, v in attrs.items(): + setattr(smile, k, v) + return smileand then:
-api.smile = Munch() -api.smile.hostname = "smile12345" -... +api.smile = build_smile( + hostname="smile12345", + model="Test Model", + model_id="Test Model ID", + name="Test Smile Name", + version="4.3.2", +)reducing ~70 duplicated lines.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (13)
CHANGELOG.md(1 hunks)custom_components/plugwise/__init__.py(2 hunks)custom_components/plugwise/climate.py(2 hunks)custom_components/plugwise/config_flow.py(3 hunks)custom_components/plugwise/coordinator.py(3 hunks)custom_components/plugwise/entity.py(1 hunks)custom_components/plugwise/manifest.json(1 hunks)pyproject.toml(1 hunks)tests/components/plugwise/conftest.py(9 hunks)tests/components/plugwise/fixtures/m_adam_multiple_devices_per_zone/data.json(1 hunks)tests/components/plugwise/snapshots/test_diagnostics.ambr(1 hunks)tests/components/plugwise/test_config_flow.py(1 hunks)tests/components/plugwise/test_init.py(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (12)
- pyproject.toml
- custom_components/plugwise/entity.py
- tests/components/plugwise/test_init.py
- custom_components/plugwise/manifest.json
- tests/components/plugwise/test_config_flow.py
- tests/components/plugwise/snapshots/test_diagnostics.ambr
- custom_components/plugwise/init.py
- custom_components/plugwise/climate.py
- custom_components/plugwise/coordinator.py
- custom_components/plugwise/config_flow.py
- CHANGELOG.md
- tests/components/plugwise/fixtures/m_adam_multiple_devices_per_zone/data.json
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: bouwew
PR: plugwise/plugwise-beta#671
File: custom_components/plugwise/switch.py:82-83
Timestamp: 2024-10-08T15:35:25.180Z
Learning: User bouwew prefers to ignore exception handling suggestions for the `pw-beta` branch in the `custom_components/plugwise/switch.py` file.
Learnt from: bouwew
PR: plugwise/plugwise-beta#671
File: custom_components/plugwise/switch.py:82-83
Timestamp: 2024-06-22T08:05:56.791Z
Learning: User bouwew prefers to ignore exception handling suggestions for the `pw-beta` branch in the `custom_components/plugwise/switch.py` file.
Learnt from: bouwew
PR: plugwise/plugwise-beta#793
File: custom_components/plugwise/manifest.json:10-11
Timestamp: 2024-12-12T19:48:34.652Z
Learning: In the Plugwise integration, temporary use of alpha versions from test repositories is acceptable for testing purposes.
Learnt from: CoMPaTech
PR: plugwise/plugwise-beta#0
File: :0-0
Timestamp: 2025-01-25T20:42:24.862Z
Learning: The linting rules in plugwise-beta have been updated to use TC001/TC002/TC003 instead of TCH001/TCH002/TCH003 for type-checking related rules.
Learnt from: bouwew
PR: plugwise/plugwise-beta#734
File: tests/components/plugwise/test_config_flow.py:58-58
Timestamp: 2024-09-27T09:48:30.890Z
Learning: In `tests/components/plugwise/test_config_flow.py`, the versions are mocked firmware versions for testing purposes and do not need to match the software version in `manifest.json`.
Learnt from: bouwew
PR: plugwise/plugwise-beta#734
File: tests/components/plugwise/test_config_flow.py:58-58
Timestamp: 2024-10-08T15:35:25.180Z
Learning: In `tests/components/plugwise/test_config_flow.py`, the versions are mocked firmware versions for testing purposes and do not need to match the software version in `manifest.json`.
tests/components/plugwise/conftest.py (2)
Learnt from: bouwew
PR: plugwise/plugwise-beta#734
File: tests/components/plugwise/test_config_flow.py:58-58
Timestamp: 2024-09-27T09:48:30.890Z
Learning: In `tests/components/plugwise/test_config_flow.py`, the versions are mocked firmware versions for testing purposes and do not need to match the software version in `manifest.json`.
Learnt from: bouwew
PR: plugwise/plugwise-beta#734
File: tests/components/plugwise/test_config_flow.py:58-58
Timestamp: 2024-10-08T15:35:25.180Z
Learning: In `tests/components/plugwise/test_config_flow.py`, the versions are mocked firmware versions for testing purposes and do not need to match the software version in `manifest.json`.
🪛 Gitleaks (8.26.0)
tests/components/plugwise/conftest.py
138-138: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
139-139: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
164-164: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
165-165: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
191-191: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
192-192: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
217-217: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
218-218: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
294-294: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Setup for HA-core (dev)
- GitHub Check: Setup for HA-core (release/master)
🔇 Additional comments (1)
tests/components/plugwise/conftest.py (1)
20-20: Verify availability of the newmunchtest-dependency
munchis not part of the standard library.
Please make sure it is already pinned inrequirements_test.txt/requirements_dev.txt; otherwise CI will break when the test runner tries to import it.
|



Summary by CodeRabbit
Bug Fixes
Chores