@@ -73,7 +73,7 @@ def __init__(
73
73
self ._user_hash )
74
74
75
75
def convert_sensor_from_farenheit (self , entity , temp ):
76
- """Ensure that the sensor returns values in Celcius
76
+ """Ensure that the sensor returns values in Celcius.
77
77
78
78
Only works with sensor entities
79
79
If the sensor uses Farenheit then we'll need to convert Farenheit to Celcius
@@ -85,10 +85,10 @@ def convert_sensor_from_farenheit(self, entity, temp):
85
85
# Convert temperature from Celcius to Farenheit
86
86
return (temp - 32 ) * 5 / 9
87
87
else :
88
- raise ValueError (f'Heat pump uses unkown units ({ heat_pump_unit } )' )
88
+ raise ValueError (f'Heat pump uses unkown units ({ sensor_unit } )' )
89
89
90
90
def convert_climate_from_farenheit (self , entity , temp ):
91
- """Ensure that the heat pump returns values in Celcius
91
+ """Ensure that the heat pump returns values in Celcius.
92
92
93
93
Only works with climate entity
94
94
If the heat_pump uses Farenheit then we'll need to convert Farenheit to Celcius
@@ -103,10 +103,11 @@ def convert_climate_from_farenheit(self, entity, temp):
103
103
raise ValueError (f'Heat pump uses unkown units ({ heat_pump_unit } )' )
104
104
105
105
def convert_climate_from_celcius (self , entity , temp ):
106
- """Ensure that the heat pump is given a temperature in the correct units
106
+ """Ensure that the heat pump is given a temperature in the correct units.
107
107
108
108
Only works with climate entities.
109
- If the heat_pump uses Farenheit then we'll need to convert Celcius to Farenheit"""
109
+ If the heat_pump uses Farenheit then we'll need to convert Celcius to Farenheit
110
+ """
110
111
heat_pump_unit = entity .temperature_unit
111
112
if heat_pump_unit == homeassistant .const .TEMP_CELSIUS :
112
113
return temp
0 commit comments