Fix unit conversion (#14730)
* reviewing this code min_temp and max_temp are always present and always in celsius * revert change (preserve unit conversion) * revert (due to unit conversion) * self * clean * cleaner
This commit is contained in:
parent
0748466ffc
commit
bb0068908d
3 changed files with 14 additions and 17 deletions
|
@ -14,8 +14,7 @@ from homeassistant.core import DOMAIN as HA_DOMAIN
|
|||
from homeassistant.components.climate import (
|
||||
STATE_HEAT, STATE_COOL, STATE_IDLE, STATE_AUTO, ClimateDevice,
|
||||
ATTR_OPERATION_MODE, ATTR_AWAY_MODE, SUPPORT_OPERATION_MODE,
|
||||
SUPPORT_AWAY_MODE, SUPPORT_TARGET_TEMPERATURE, PLATFORM_SCHEMA,
|
||||
DEFAULT_MIN_TEMP, DEFAULT_MAX_TEMP)
|
||||
SUPPORT_AWAY_MODE, SUPPORT_TARGET_TEMPERATURE, PLATFORM_SCHEMA)
|
||||
from homeassistant.const import (
|
||||
ATTR_UNIT_OF_MEASUREMENT, STATE_ON, STATE_OFF, ATTR_TEMPERATURE,
|
||||
CONF_NAME, ATTR_ENTITY_ID, SERVICE_TURN_ON, SERVICE_TURN_OFF,
|
||||
|
@ -268,7 +267,8 @@ class GenericThermostat(ClimateDevice):
|
|||
if self._min_temp:
|
||||
return self._min_temp
|
||||
|
||||
return DEFAULT_MIN_TEMP
|
||||
# get default temp from super class
|
||||
return super().min_temp
|
||||
|
||||
@property
|
||||
def max_temp(self):
|
||||
|
@ -277,7 +277,8 @@ class GenericThermostat(ClimateDevice):
|
|||
if self._max_temp:
|
||||
return self._max_temp
|
||||
|
||||
return DEFAULT_MAX_TEMP
|
||||
# Get default temp from super class
|
||||
return super().max_temp
|
||||
|
||||
@asyncio.coroutine
|
||||
def _async_sensor_changed(self, entity_id, old_state, new_state):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue