File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -202,14 +202,17 @@ def set_humidity(cls, humidity: int) -> List[Component]:
202202 return [Component (Setting .TARGET_HUMIDITY , humidity )]
203203
204204 @classmethod
205- def set_temperature (cls , temperature : int ) -> List [Component ]:
205+ def set_temperature (cls , temperature : int , temperature_unit : Unit = Unit . FAHRENHEIT ) -> List [Component ]:
206206 # Note: Frigidaire sets limits for temperature which could cause this action to fail
207207 # Temperature ranges are below, inclusive of the endpoints
208208 # Fahrenheit: 60-90
209209 # Celsius: 16-32
210+ logging .debug ("Client setting target to {} {}" .format (temperature , temperature_unit ))
211+ temperature_unit_setting = Setting .TARGET_TEMPERATURE_F if temperature_unit == Unit .FAHRENHEIT else Setting .TARGET_TEMPERATURE_C
212+
210213 return [
211- Component (Setting .TEMPERATURE_REPRESENTATION , Unit . FAHRENHEIT ),
212- Component (Setting . TARGET_TEMPERATURE_F , temperature ),
214+ Component (Setting .TEMPERATURE_REPRESENTATION , temperature_unit ),
215+ Component (temperature_unit_setting , temperature ),
213216 ]
214217
215218
You can’t perform that action at this time.
0 commit comments