diff --git a/homeassistant/components/hisense_aehw4a1/climate.py b/homeassistant/components/hisense_aehw4a1/climate.py index 9612fd74f0b0..a5d8dc800af5 100644 --- a/homeassistant/components/hisense_aehw4a1/climate.py +++ b/homeassistant/components/hisense_aehw4a1/climate.py @@ -160,7 +160,6 @@ def __init__(self, device): self._preset_modes = PRESET_MODES self._available = None self._on = None - self._temperature_unit = None self._current_temperature = None self._target_temperature = None self._attr_hvac_mode = None @@ -185,9 +184,9 @@ async def async_update(self) -> None: self._on = status["run_status"] if status["temperature_Fahrenheit"] == "0": - self._temperature_unit = TEMP_CELSIUS + self._attr_temperature_unit = TEMP_CELSIUS else: - self._temperature_unit = TEMP_FAHRENHEIT + self._attr_temperature_unit = TEMP_FAHRENHEIT self._current_temperature = int(status["indoor_temperature_status"], 2) @@ -237,11 +236,6 @@ def name(self): """Return the name of the climate device.""" return self._unique_id - @property - def temperature_unit(self): - """Return the unit of measurement.""" - return self._temperature_unit - @property def current_temperature(self): """Return the current temperature.""" @@ -285,14 +279,14 @@ def swing_modes(self): @property def min_temp(self): """Return the minimum temperature.""" - if self._temperature_unit == TEMP_CELSIUS: + if self.temperature_unit == TEMP_CELSIUS: return MIN_TEMP_C return MIN_TEMP_F @property def max_temp(self): """Return the maximum temperature.""" - if self._temperature_unit == TEMP_CELSIUS: + if self.temperature_unit == TEMP_CELSIUS: return MAX_TEMP_C return MAX_TEMP_F @@ -312,7 +306,7 @@ async def async_set_temperature(self, **kwargs: Any) -> None: _LOGGER.debug("Setting temp of %s to %s", self._unique_id, temp) if self._preset_mode != PRESET_NONE: await self.async_set_preset_mode(PRESET_NONE) - if self._temperature_unit == TEMP_CELSIUS: + if self.temperature_unit == TEMP_CELSIUS: await self._device.command(f"temp_{int(temp)}_C") else: await self._device.command(f"temp_{int(temp)}_F")