Skip to content

Weather units: climacell (1.3/4)#61472

Merged
raman325 merged 2 commits intohome-assistant:devfrom
rianadon:weather-units-climacell
Jan 3, 2022
Merged

Weather units: climacell (1.3/4)#61472
raman325 merged 2 commits intohome-assistant:devfrom
rianadon:weather-units-climacell

Conversation

@rianadon
Copy link
Copy Markdown
Contributor

Proposed change

Uses the new weather conversion in the weather entity ( #59533) to convert weather values to the configured units.

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

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

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.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • 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:

@probot-home-assistant
Copy link
Copy Markdown

Hey there @raman325, mind taking a look at this pull request as it has been labeled with an integration (climacell) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@raman325
Copy link
Copy Markdown
Contributor

raman325 commented Dec 11, 2021

Some attribute values in the tests have changed. Can you verify if the new value is correct? If they are, please update the tests, and thank you!

EDIT: at second glance, some of these changes seem suspect. Look at wind speed as an example:

 -   'wind_speed': 11.6517},
  ?                 ^^ ^^^^
  +   'wind_speed': 3.24},

that's a 3+ factor difference between numbers. That would not make sense for MPH -> KPH or MPH -> m/s. So something seems off but I haven't dug in enough to figure out why

@rianadon
Copy link
Copy Markdown
Contributor Author

rianadon commented Dec 11, 2021

My bad! I'll update!

It's KPH -> m/s (the default metric wind speed got changed to m/s since it seems that's what most of the world uses).

However, the easy fix is to adjust the unit system to keep the units that were used before.

@rianadon rianadon force-pushed the weather-units-climacell branch from 320b527 to f35e535 Compare December 11, 2021 10:33
@epenet
Copy link
Copy Markdown
Contributor

epenet commented Dec 14, 2021

@raman325: with #59698 coming along, is this still needed?

@raman325
Copy link
Copy Markdown
Contributor

raman325 commented Dec 15, 2021

@raman325: with #59698 coming along, is this still needed?

yes for at least a couple of releases after the new integration gets merged because V3 users will still be able to use the old integration, so this is still a good fix and can be implemented in the linked PR

Copy link
Copy Markdown
Contributor

@raman325 raman325 left a comment

Choose a reason for hiding this comment

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

LGTM thanks!

@raman325 raman325 merged commit 48057e1 into home-assistant:dev Jan 3, 2022
jeeftor pushed a commit to jeeftor/core that referenced this pull request Jan 4, 2022
* climacell units

* Fix climacell tests
@github-actions github-actions bot locked and limited conversation to collaborators Jan 4, 2022
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