Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/simbaja/ha_gehome into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
simbaja committed Jun 23, 2024
2 parents 1e94af9 + aa857f3 commit b36b317
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions custom_components/ge_home/entities/common/ge_climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,20 @@ def is_on(self) -> bool:

@property
def target_temperature(self) -> Optional[float]:
measurement_system = self.appliance.get_erd_value(ErdCode.TEMPERATURE_UNIT)
if measurement_system == ErdMeasurementUnits.METRIC:
targ = float(self.appliance.get_erd_value(self.target_temperature_erd_code))
targ = round( ((targ - 32.0) * (5/9)) / 2 ) * 2
return (9 * targ) / 5 + 32
return float(self.appliance.get_erd_value(self.target_temperature_erd_code))

@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
Expand Down

0 comments on commit b36b317

Please sign in to comment.