From 240b4078cdfafcbc01484999728a8f075937ec22 Mon Sep 17 00:00:00 2001 From: o951753o <36664073+o951753o@users.noreply.github.com> Date: Thu, 5 Jan 2023 01:22:22 -0800 Subject: [PATCH] Fix typo in Tuya climate (#85185) --- homeassistant/components/tuya/climate.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/tuya/climate.py b/homeassistant/components/tuya/climate.py index 64151195b01..1cb01988bfc 100644 --- a/homeassistant/components/tuya/climate.py +++ b/homeassistant/components/tuya/climate.py @@ -162,10 +162,10 @@ class TuyaClimateEntity(TuyaEntity, ClimateEntity): celsius_type = self.find_dpcode( (DPCode.TEMP_CURRENT, DPCode.UPPER_TEMP), dptype=DPType.INTEGER ) - farhenheit_type = self.find_dpcode( + fahrenheit_type = self.find_dpcode( (DPCode.TEMP_CURRENT_F, DPCode.UPPER_TEMP_F), dptype=DPType.INTEGER ) - if farhenheit_type and ( + if fahrenheit_type and ( prefered_temperature_unit == UnitOfTemperature.FAHRENHEIT or ( prefered_temperature_unit == UnitOfTemperature.CELSIUS @@ -173,7 +173,7 @@ class TuyaClimateEntity(TuyaEntity, ClimateEntity): ) ): self._attr_temperature_unit = UnitOfTemperature.FAHRENHEIT - self._current_temperature = farhenheit_type + self._current_temperature = fahrenheit_type elif celsius_type: self._attr_temperature_unit = UnitOfTemperature.CELSIUS self._current_temperature = celsius_type @@ -182,17 +182,17 @@ class TuyaClimateEntity(TuyaEntity, ClimateEntity): celsius_type = self.find_dpcode( DPCode.TEMP_SET, dptype=DPType.INTEGER, prefer_function=True ) - farhenheit_type = self.find_dpcode( + fahrenheit_type = self.find_dpcode( DPCode.TEMP_SET_F, dptype=DPType.INTEGER, prefer_function=True ) - if farhenheit_type and ( + if fahrenheit_type and ( prefered_temperature_unit == UnitOfTemperature.FAHRENHEIT or ( prefered_temperature_unit == UnitOfTemperature.CELSIUS and not celsius_type ) ): - self._set_temperature = farhenheit_type + self._set_temperature = fahrenheit_type elif celsius_type: self._set_temperature = celsius_type