jabesq-org / pyatmo

Simple API to access Netatmo weather station data from any python script (for Netatmo information, see www.netatmo.com)
MIT License
26 stars 28 forks source link

Add cooler support #504

Closed cgtobi closed 1 month ago

cgtobi commented 1 month ago

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:

Enhancements:

Tests:

sourcery-ai[bot] commented 1 month ago

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](https://app.sourcery.ai): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.
softwarebloat commented 1 month ago

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