mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 08:47:57 +00:00
Bug fixes and state adjustment for initial thermostat range support
This commit is contained in:
parent
2d54fdd979
commit
21812ba717
@ -114,7 +114,7 @@ class ThermostatDevice(Entity):
|
||||
@property
|
||||
def state(self):
|
||||
""" Returns the current state. """
|
||||
return self.operation
|
||||
return self.target_temperature
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
@ -147,10 +147,7 @@ class ThermostatDevice(Entity):
|
||||
ATTR_TEMPERATURE_HIGH: round(convert(self.target_temperature_high,
|
||||
thermostat_unit,
|
||||
user_unit), 0),
|
||||
ATTR_OPERATION: round(convert(self.operation,
|
||||
thermostat_unit,
|
||||
user_unit), 0)
|
||||
|
||||
ATTR_OPERATION: self.operation
|
||||
}
|
||||
|
||||
is_away = self.is_away_mode_on
|
||||
|
@ -123,14 +123,14 @@ class NestThermostat(ThermostatDevice):
|
||||
def target_temperature_low(self):
|
||||
""" Returns the lower bound temperature we try to reach. """
|
||||
if self.device.mode == 'range':
|
||||
return self.device.target["low"]
|
||||
return round(self.device.target[0], 1)
|
||||
return round(self.target_temperature, 1)
|
||||
|
||||
@property
|
||||
def target_temperature_high(self):
|
||||
""" Returns the upper bound temperature we try to reach. """
|
||||
if self.device.mode == 'range':
|
||||
return self.device.target["high"]
|
||||
return round(self.device.target[1], 1)
|
||||
return round(self.target_temperature, 1)
|
||||
|
||||
@property
|
||||
|
Loading…
x
Reference in New Issue
Block a user