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

Climate component reports wrong unit when converting between C - F #3605

Closed
balloob opened this issue Sep 30, 2016 · 6 comments
Closed

Climate component reports wrong unit when converting between C - F #3605

balloob opened this issue Sep 30, 2016 · 6 comments
Labels

Comments

@balloob
Copy link
Member

balloob commented Sep 30, 2016

Home Assistant release (hass --version): 0.29.4
Python release (python3 --version): All
Component/platform: Climate
Description of problem:
The Climate component reports more than just a state in a specified unit. This is not a case that the automatic conversion of the Entity class can handle.

This results in that the Climate component will convert Celsius correctly to Fahrenheit but it will still show C as unit of measurement in the state and UI (and other way around too).

For this to be fixed, we should do the following steps:

  • unit_of_measurement property should be owned by the climate ABC and be equal to self.hass.config.units.temperature_unit
  • Introduce a new property that will be implemented by all climate platforms (ie temperature_unit)
  • In ClimateEntity._convert_for_display pass self.temperature_unit instead of self.unit_of_measurement to convert_temperature.
@balloob
Copy link
Member Author

balloob commented Oct 9, 2016

Not sure why this is closed. #3755 is a first good stab at this. Reopening.

@balloob balloob reopened this Oct 9, 2016
@pvizeli
Copy link
Member

pvizeli commented Oct 9, 2016

Oh sorry, the wrong issue. I have to close a other.

@juggie
Copy link
Contributor

juggie commented Oct 14, 2016

I was looking at this in a little more detail as it relates to ecobee.

As far as the ecobee api is concerned, everything seems to come back in F. The 'useCelsius' flag (which is True in my results) appears to simply mean the user has set Celsius and everything should be presented that way, but the data in the json object is Fahrenheit. As such the way the ecobee climate module implements this as written appears to be incorrect.

@turbokongen
Copy link
Contributor

Is this solved for everyone now with 0.31?

@Vertikar
Copy link

@turbokongen looks good for me now..
image

@turbokongen
Copy link
Contributor

Excellent!

@home-assistant home-assistant locked and limited conversation to collaborators Mar 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants