Skip to content

Add Opentherm Gateway current and setpoint precision#47484

Merged
MartinHjelmare merged 20 commits into
home-assistant:devfrom
Martidjen:pyotgw-improvements
Mar 18, 2021
Merged

Add Opentherm Gateway current and setpoint precision#47484
MartinHjelmare merged 20 commits into
home-assistant:devfrom
Martidjen:pyotgw-improvements

Conversation

@Martidjen
Copy link
Copy Markdown
Contributor

@Martidjen Martidjen commented Mar 5, 2021

Proposed change

Dividing temperature precision into precision for current temperature and precision for setpoint temperature

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

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.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

Martidjen and others added 4 commits February 25, 2021 12:02
Devided precision into read and set precision.
Added option for setpoint override mode, can be set to temporary or constant (some thermostats work better with constant mode)
Fixing some issues found while testing and adding translations for new options
Fixing some issues after running local tests
@probot-home-assistant
Copy link
Copy Markdown

Hey there @mvn23, mind taking a look at this pull request as its been labeled with an integration (opentherm_gw) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

@Martidjen Martidjen changed the title Pyotgw improvements Opentherm Gateway improvements Mar 5, 2021
Setting rights en sorting order to satisfy the checks in the pull request
@mvn23
Copy link
Copy Markdown
Contributor

mvn23 commented Mar 6, 2021

Translations should be handled separately, see here.
Please remove them from the PR.

Reverting changes to translations after comment on PR
@Martidjen
Copy link
Copy Markdown
Contributor Author

Reverted my changes to the translations, thank you for replying

Found some more changes to be corrected
Comment thread homeassistant/components/opentherm_gw/__init__.py Outdated
@MartinHjelmare
Copy link
Copy Markdown
Member

I recommend splitting this PR into two PRs, one per bullet in the description.

Comment thread homeassistant/components/opentherm_gw/climate.py Outdated
Comment thread homeassistant/components/opentherm_gw/config_flow.py Outdated
Splitting up the pull request. Setpoint override mode will be added in a separate pull request as a boolean
Forgot to remove these includes
Apparently the includes were supposed to be sorted on one line
Changes to the schema for yaml config are not allowed to be changed any more
The CONF_PRECISION constant is needed again after reverting the schema for yaml config options
@Martidjen Martidjen requested a review from MartinHjelmare March 7, 2021 20:37
Copy link
Copy Markdown
Contributor

@mvn23 mvn23 left a comment

Choose a reason for hiding this comment

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

Code looks good to me 👍

Comment thread homeassistant/components/opentherm_gw/climate.py Outdated
Comment thread homeassistant/components/opentherm_gw/climate.py Outdated
Comment thread tests/components/opentherm_gw/test_config_flow.py
Fixing some review comments, still getting a warning:
RuntimeWarning: coroutine 'ConfigEntries.async_setup' was never awaited
Comment thread tests/components/opentherm_gw/test_config_flow.py Outdated
Martidjen and others added 3 commits March 9, 2021 15:15
As suggested by MartinHjelmare, thank you for your input

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Comment thread homeassistant/components/opentherm_gw/climate.py
New settings for precision will both be set to the value of the old precision setting when coming from the previous version of this integration
Copy link
Copy Markdown
Contributor

@mvn23 mvn23 left a comment

Choose a reason for hiding this comment

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

See comments. We should also consider adding a test case for the options migration.

Comment thread homeassistant/components/opentherm_gw/__init__.py Outdated
Comment thread homeassistant/components/opentherm_gw/__init__.py Outdated
Added test for the options migration when updating from previous version
Copy link
Copy Markdown
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Looks good!

@MartinHjelmare
Copy link
Copy Markdown
Member

@mvn23 ok with you?

Copy link
Copy Markdown
Contributor

@mvn23 mvn23 left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍
Thanks @Martidjen for the PR and @MartinHjelmare for the review!

@MartinHjelmare MartinHjelmare changed the title Opentherm Gateway improvements Add Opentherm Gateway current and setpoint precision Mar 18, 2021
@MartinHjelmare MartinHjelmare merged commit 8a37b61 into home-assistant:dev Mar 18, 2021
@Martidjen Martidjen deleted the pyotgw-improvements branch March 19, 2021 08:01
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 20, 2021
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.

4 participants