This commit is contained in:
Steve2Go 2024-03-31 22:46:31 +10:00 committed by GitHub
commit 8fa0341a0b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -98,6 +98,11 @@ class GeClimate(GeEntity, ClimateEntity):
@property
def current_temperature(self) -> Optional[float]:
measurement_system = self.appliance.get_erd_value(ErdCode.TEMPERATURE_UNIT)
if measurement_system == ErdMeasurementUnits.METRIC:
current = float(self.appliance.get_erd_value(self.current_temperature_erd_code))
current = round( (current - 32.0) * (5/9))
return (9 * current) / 5 + 32
return float(self.appliance.get_erd_value(self.current_temperature_erd_code))
@property