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

Fix opentherm_gw config flow migration #28474

merged 2 commits into from Nov 25, 2019


Copy link

mvn23 commented Nov 2, 2019


The config flow migration for opentherm_gw lacked default options. This was not taken into account with the subsequent options flow PR, causing problems with the climate platform after migration.
This PR implements default options for the opentherm_gw climate platform.

Related issue (if applicable): fixes #28363
Pull request with documentation for (if applicable): N/A

Example entry for configuration.yaml (if applicable):



  • 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:

  • N/A

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:

  • N/A
@project-bot project-bot bot added this to Needs review in Dev Nov 2, 2019
@project-bot project-bot bot moved this from Needs review to By Code Owner in Dev Nov 2, 2019

This comment has been minimized.

Copy link
Contributor Author

mvn23 commented Nov 2, 2019

Failed tests seem unrelated. Can we do something about this?

self.floor_temp = options[CONF_FLOOR_TEMP]
self.temp_precision = options.get(CONF_PRECISION)
self.temp_precision = options[CONF_PRECISION]

This comment has been minimized.

Copy link

balloob Nov 2, 2019


Wouldn't it make more sense to use options.get(CONF_PRECISION, DEFAULT_PRECISION) and then do options = options or {} above ? That way you can have 1 missing option too.

This comment has been minimized.

Copy link

mvn23 Nov 2, 2019

Author Contributor

That should not happen. The config flow creates an entry with no options and the options flow provides default values for all options. However, this may indeed become an issue if more options are added in the future. I will make the change.

EDIT: updated, options = options or {} is not necessary as options defaults to an empty dict.

mvn23 added 2 commits Nov 2, 2019
@mvn23 mvn23 force-pushed the mvn23:otgw_config_flow_fix branch from 66d6d0e to 8eba25f Nov 4, 2019
@MartinHjelmare MartinHjelmare changed the title Fix opentherm_gw config flow migration. Fix opentherm_gw config flow migration Nov 5, 2019
Dev automation moved this from By Code Owner to Reviewer approved Nov 25, 2019
@balloob balloob merged commit f53812f into home-assistant:dev Nov 25, 2019
11 checks passed
11 checks passed
CI Build #20191104.53 succeeded
CI (FullCheck Mypy) FullCheck Mypy succeeded
CI (FullCheck Pylint) FullCheck Pylint succeeded
CI (Overview CheckFormat) Overview CheckFormat succeeded
CI (Overview Lint) Overview Lint succeeded
CI (Overview Validate) Overview Validate succeeded
CI (Tests PyTest Python36) Tests PyTest Python36 succeeded
CI (Tests PyTest Python37) Tests PyTest Python37 succeeded
cla-bot Everyone involved has signed the CLA
codecov/patch Coverage not affected when comparing f3ea44c...8eba25f
codecov/project 94.42% (target 90%)
Dev automation moved this from Reviewer approved to Done Nov 25, 2019
@lock lock bot locked and limited conversation to collaborators Nov 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
3 participants
You can’t perform that action at this time.