Skip to content

Commit

Permalink
Fix unit conversion for Sensibo A/C units (home-assistant#10692)
Browse files Browse the repository at this point in the history
* Fix unit conversion for Sensibo A/C units

When the Sensibo component was released, there was a provision to not convert the temperature units unless "nativeTemperatureUnit" was returned with the API. I'm not sure if the API changed on Sensibo's side, but I do not get this key passed back with API requests.

This causes my current temperature to be returned in CELSIUS instead of FAHRENHEIT.

Removing this fixes it, and I can confirm the units are shown properly now.

* Update adding comment showing temperature is always in C
  • Loading branch information
bryanyork authored and andrey-git committed Nov 21, 2017
1 parent 8a750eb commit 9c77f5f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions homeassistant/components/climate/sensibo.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,8 @@ def current_humidity(self):
@property
def current_temperature(self):
"""Return the current temperature."""
# This field is not affected by temperature_unit.
# It is always in C / nativeTemperatureUnit
if 'nativeTemperatureUnit' not in self._ac_states:
return self._measurements['temperature']
# This field is not affected by temperatureUnit.
# It is always in C
return convert_temperature(
self._measurements['temperature'],
TEMP_CELSIUS,
Expand Down

0 comments on commit 9c77f5f

Please sign in to comment.