mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Fixed wrong setpoint value on startup when climate was previously turned off (#24377)
This commit is contained in:
parent
952d72fdd3
commit
a3794b3241
@ -51,7 +51,7 @@ class LcnClimate(LcnDevice, ClimateDevice):
|
|||||||
|
|
||||||
self._current_temperature = None
|
self._current_temperature = None
|
||||||
self._target_temperature = None
|
self._target_temperature = None
|
||||||
self._is_on = True
|
self._is_on = None
|
||||||
|
|
||||||
self.support = const.SUPPORT_TARGET_TEMPERATURE
|
self.support = const.SUPPORT_TARGET_TEMPERATURE
|
||||||
if self.is_lockable:
|
if self.is_lockable:
|
||||||
@ -130,10 +130,12 @@ class LcnClimate(LcnDevice, ClimateDevice):
|
|||||||
return
|
return
|
||||||
|
|
||||||
if input_obj.get_var() == self.variable:
|
if input_obj.get_var() == self.variable:
|
||||||
self._current_temperature = (
|
self._current_temperature = \
|
||||||
input_obj.get_value().to_var_unit(self.unit))
|
input_obj.get_value().to_var_unit(self.unit)
|
||||||
elif self._is_on and input_obj.get_var() == self.setpoint:
|
elif input_obj.get_var() == self.setpoint:
|
||||||
self._target_temperature = (
|
self._is_on = not input_obj.get_value().is_locked_regulator()
|
||||||
input_obj.get_value().to_var_unit(self.unit))
|
if self.is_on:
|
||||||
|
self._target_temperature = \
|
||||||
|
input_obj.get_value().to_var_unit(self.unit)
|
||||||
|
|
||||||
self.async_schedule_update_ha_state()
|
self.async_schedule_update_ha_state()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user