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

Bugfix Thermostat Fahrenheit support #13477

Merged
merged 3 commits into from Mar 27, 2018
Merged

Bugfix Thermostat Fahrenheit support #13477

merged 3 commits into from Mar 27, 2018

Conversation

cdce8p
Copy link
Member

@cdce8p cdce8p commented Mar 26, 2018

Description:

Fixes unit missing unit conversion from Fahrenheit to Celsius (from HomeKit).

Related issue (if applicable): fixes #13463

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • Tests have been added to verify that the new code works.

* util -> temperature_to_homekit
* util -> temperature_to_states
* util -> convert_to_float
@cdce8p cdce8p added the bug label Mar 26, 2018
@cdce8p cdce8p added this to the 0.66 milestone Mar 26, 2018
@cdce8p cdce8p changed the title Homekit: Bugfix Thermostat support Fahrenheit Homekit: Bugfix Thermostat Fahrenheit support Mar 26, 2018


def temperature_to_states(temperature, unit):
"""Convert temperature back form Celsius to Home Assistant unit."""
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

I want to preserve the original unit of the climate device. That's why I only use util.temperature.convert.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, good 👍

@cdce8p cdce8p merged commit 9eda04b into home-assistant:dev Mar 27, 2018
@cdce8p cdce8p deleted the homekit-thermostat-fix branch March 27, 2018 09:31
@fabaff fabaff changed the title Homekit: Bugfix Thermostat Fahrenheit support Bugfix Thermostat Fahrenheit support Mar 29, 2018
balloob pushed a commit that referenced this pull request Mar 30, 2018
* Bugfix thermostat temperature conversion
* util -> temperature_to_homekit
* util -> temperature_to_states
* util -> convert_to_float
* Added tests, deleted log msg
@balloob balloob mentioned this pull request Mar 30, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Jul 26, 2018
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.

HomeKit component Not Working With Nest
4 participants