1
mirror of https://github.com/home-assistant/core synced 2024-08-31 05:57:13 +02:00

Fix Fibaro HC2 climate device missing temperature (#42627)

This commit is contained in:
airthusiast 2020-10-30 18:50:59 +01:00 committed by GitHub
parent f9208634bd
commit c8944760b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -321,7 +321,7 @@ class FibaroThermostat(FibaroDevice, ClimateEntity):
"""Return the current temperature."""
if self._temp_sensor_device:
device = self._temp_sensor_device.fibaro_device
if device.properties.heatingThermostatSetpoint:
if "heatingThermostatSetpoint" in device.properties:
return float(device.properties.heatingThermostatSetpoint)
return float(device.properties.value)
return None
@ -331,7 +331,7 @@ class FibaroThermostat(FibaroDevice, ClimateEntity):
"""Return the temperature we try to reach."""
if self._target_temp_device:
device = self._target_temp_device.fibaro_device
if device.properties.heatingThermostatSetpointFuture:
if "heatingThermostatSetpointFuture" in device.properties:
return float(device.properties.heatingThermostatSetpointFuture)
return float(device.properties.targetLevel)
return None