mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Fix for Fibaro HC3 support, climate temp sensor and target temp (#42300)
This commit is contained in:
parent
64b1ccd8f6
commit
3846639744
@ -132,7 +132,10 @@ class FibaroThermostat(FibaroDevice, ClimateEntity):
|
|||||||
elif (
|
elif (
|
||||||
self._temp_sensor_device is None
|
self._temp_sensor_device is None
|
||||||
and "unit" in device.properties
|
and "unit" in device.properties
|
||||||
and "value" in device.properties
|
and (
|
||||||
|
"value" in device.properties
|
||||||
|
or "heatingThermostatSetpoint" in device.properties
|
||||||
|
)
|
||||||
and (device.properties.unit == "C" or device.properties.unit == "F")
|
and (device.properties.unit == "C" or device.properties.unit == "F")
|
||||||
):
|
):
|
||||||
self._temp_sensor_device = FibaroDevice(device)
|
self._temp_sensor_device = FibaroDevice(device)
|
||||||
@ -141,6 +144,7 @@ class FibaroThermostat(FibaroDevice, ClimateEntity):
|
|||||||
if (
|
if (
|
||||||
"setTargetLevel" in device.actions
|
"setTargetLevel" in device.actions
|
||||||
or "setThermostatSetpoint" in device.actions
|
or "setThermostatSetpoint" in device.actions
|
||||||
|
or "setHeatingThermostatSetpoint" in device.actions
|
||||||
):
|
):
|
||||||
self._target_temp_device = FibaroDevice(device)
|
self._target_temp_device = FibaroDevice(device)
|
||||||
self._support_flags |= SUPPORT_TARGET_TEMPERATURE
|
self._support_flags |= SUPPORT_TARGET_TEMPERATURE
|
||||||
@ -317,6 +321,8 @@ class FibaroThermostat(FibaroDevice, ClimateEntity):
|
|||||||
"""Return the current temperature."""
|
"""Return the current temperature."""
|
||||||
if self._temp_sensor_device:
|
if self._temp_sensor_device:
|
||||||
device = self._temp_sensor_device.fibaro_device
|
device = self._temp_sensor_device.fibaro_device
|
||||||
|
if device.properties.heatingThermostatSetpoint:
|
||||||
|
return float(device.properties.heatingThermostatSetpoint)
|
||||||
return float(device.properties.value)
|
return float(device.properties.value)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@ -325,6 +331,8 @@ class FibaroThermostat(FibaroDevice, ClimateEntity):
|
|||||||
"""Return the temperature we try to reach."""
|
"""Return the temperature we try to reach."""
|
||||||
if self._target_temp_device:
|
if self._target_temp_device:
|
||||||
device = self._target_temp_device.fibaro_device
|
device = self._target_temp_device.fibaro_device
|
||||||
|
if device.properties.heatingThermostatSetpointFuture:
|
||||||
|
return float(device.properties.heatingThermostatSetpointFuture)
|
||||||
return float(device.properties.targetLevel)
|
return float(device.properties.targetLevel)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@ -335,5 +343,7 @@ class FibaroThermostat(FibaroDevice, ClimateEntity):
|
|||||||
if temperature is not None:
|
if temperature is not None:
|
||||||
if "setThermostatSetpoint" in target.fibaro_device.actions:
|
if "setThermostatSetpoint" in target.fibaro_device.actions:
|
||||||
target.action("setThermostatSetpoint", self.fibaro_op_mode, temperature)
|
target.action("setThermostatSetpoint", self.fibaro_op_mode, temperature)
|
||||||
|
elif "setHeatingThermostatSetpoint" in target.fibaro_device.actions:
|
||||||
|
target.action("setHeatingThermostatSetpoint", temperature)
|
||||||
else:
|
else:
|
||||||
target.action("setTargetLevel", temperature)
|
target.action("setTargetLevel", temperature)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user