Skip to content
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

Add cooler support #504

Merged
merged 1 commit into from
Aug 20, 2024
Merged

Add cooler support #504

merged 1 commit into from
Aug 20, 2024

Conversation

cgtobi
Copy link
Collaborator

@cgtobi cgtobi commented Aug 18, 2024

Summary by Sourcery

Add support for cooling systems by introducing new attributes and a CoolerMixin class. Enhance logging for better debugging and extend tests to cover new cooling functionality.

New Features:

  • Introduce support for cooling systems by adding new attributes related to cooling setpoints and modes in the Room and Home classes.
  • Add a CoolerMixin class to handle cooler-specific data, which is integrated into the Smarther thermostat class.

Enhancements:

  • Improve logging in the account module by including additional context in debug messages.

Tests:

  • Add a test to verify the new temperature control mode functionality, specifically checking for the 'cooling' mode.

@cgtobi cgtobi requested a review from jabesq as a code owner August 18, 2024 21:19
Copy link

sourcery-ai bot commented Aug 18, 2024

Reviewer's Guide by Sourcery

This pull request adds support for cooler functionality to the pyatmo library. The changes primarily affect the Room and Home classes, introducing new attributes and methods related to cooling operations. The implementation also includes updates to module mixins, constants, and test cases to accommodate the new cooling features.

File-Level Changes

Files Changes
src/pyatmo/room.py Added new attributes to the Room class for cooling functionality, including cooling_setpoint_temperature, cooling_setpoint_start_time, cooling_setpoint_end_time, and cooling_setpoint_mode.
src/pyatmo/home.py Introduced new attributes to the Home class: temperature_control_mode, therm_mode, therm_setpoint_default_duration, and cooling_mode.
src/pyatmo/modules/module.py Created a new CoolerMixin class to handle cooler-specific data.
src/pyatmo/modules/smarther.py Updated the BNS class to include the new CoolerMixin.
src/pyatmo/const.py Added a new constant UNKNOWN to handle unknown values.
fixtures/homesdata.json Updated the fixtures to include cooling-related data.
src/pyatmo/room.py Modified the update method in the Room class to handle new cooling-related attributes.
src/pyatmo/home.py Updated the Home class's update_topology method to handle new cooling-related attributes.
tests/test_home.py Added a test case to verify the new temperature_control_mode attribute in the Home class.

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @cgtobi - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider adding documentation or comments for the new cooling-related attributes, especially in the Room class, to explain their purpose and usage.
  • It would be beneficial to add new test cases to cover the newly added cooling functionality and ensure proper test coverage.
Here's what I looked at during the review
  • 🟡 General issues: 2 issues found
  • 🟢 Security: all looks good
  • 🟡 Testing: 1 issue found
  • 🟡 Complexity: 2 issues found
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

src/pyatmo/room.py Show resolved Hide resolved
src/pyatmo/home.py Show resolved Hide resolved
tests/test_home.py Show resolved Hide resolved
src/pyatmo/modules/module.py Show resolved Hide resolved
src/pyatmo/modules/smarther.py Show resolved Hide resolved
@cgtobi cgtobi force-pushed the feat/update_BNS branch 2 times, most recently from dd1a27c to 7f11b6b Compare August 18, 2024 21:45
@softwarebloat
Copy link

thanks for this! really waiting for it to be reviewed and merged 🙏

@jabesq jabesq merged commit 48475c9 into development Aug 20, 2024
6 checks passed
@jabesq jabesq deleted the feat/update_BNS branch August 20, 2024 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants