Fix unit conversion for Sensibo A/C units (#10692)

* 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
This commit is contained in:
Bryan York 2017-11-21 10:48:36 -08:00 committed by Andrey
parent 8a750eba68
commit 9c77f5f5a9

View File

@ -133,10 +133,8 @@ class SensiboClimate(ClimateDevice):
@property @property
def current_temperature(self): def current_temperature(self):
"""Return the current temperature.""" """Return the current temperature."""
# This field is not affected by temperature_unit. # This field is not affected by temperatureUnit.
# It is always in C / nativeTemperatureUnit # It is always in C
if 'nativeTemperatureUnit' not in self._ac_states:
return self._measurements['temperature']
return convert_temperature( return convert_temperature(
self._measurements['temperature'], self._measurements['temperature'],
TEMP_CELSIUS, TEMP_CELSIUS,