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

Prepare Netatmo for climate 1.0 #24973

Merged
merged 3 commits into from
Jul 6, 2019

Conversation

cgtobi
Copy link
Contributor

@cgtobi cgtobi commented Jul 5, 2019

Description:

Prepare the Netatmo climate component for the big Climate-1.0 change in #23899.

Related issue (if applicable): fixes #

Pull request with documentation for home-assistant.io (if applicable): home-assistant/home-assistant.io#<home-assistant.io PR number goes here>

Example entry for configuration.yaml (if applicable):

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly. Update and include derived files by running python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=10)
PRESET_FROST_GUARD = 'frost_guard'
PRESET_MAX = 'max'
PRESET_OFF = HVAC_MODE_OFF
Copy link
Member

Choose a reason for hiding this comment

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

None will be passed as preset for the off preset.

"""Return the operation modes list."""
return self._operation_list
"""Return the list of available hvac operation modes."""
return SUPPORT_HVAC
Copy link
Member

Choose a reason for hiding this comment

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

Why do you maintain self._operation_list if you are not using it ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True, thanks for the hint.

Copy link
Member

@balloob balloob left a comment

Choose a reason for hiding this comment

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

ok to merge if final comment addressed

@balloob
Copy link
Member

balloob commented Jul 6, 2019

I don't think that just setting your preset value to None was correct, since you also assigned that to the STATE_OFF and also passed it to set_preset. Addressed it in e5a9df7

@balloob balloob merged commit 0d34dc9 into home-assistant:climate-1.0 Jul 6, 2019
@lock lock bot locked and limited conversation to collaborators Jul 7, 2019
@cgtobi cgtobi deleted the netatmo_climate-1.0_2 branch August 25, 2020 05:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants