@@ -216,10 +216,7 @@ def update(self):
216216
217217 @property
218218 def hvac_action (self ):
219- """Return the current running hvac operation if supported.
220-
221- Need to be one of CURRENT_HVAC_*.
222- """
219+ """Return the current running hvac operation if supported."""
223220 return self ._current_hvac_mode
224221
225222 @property
@@ -342,16 +339,15 @@ def _apply_action(self, target_temperature):
342339 target_temperature = 16
343340 if self .tahoma_device .active_states ['core:DerogatedTargetTemperatureState' ] != target_temperature :
344341 from time import sleep
345- self .apply_action ("refreshState" )
346- self .apply_action ("setModeTemperature" , "manualMode" , target_temperature )
347- self .apply_action ("setDerogation" , target_temperature , "further_notice" )
348- self .apply_action ("refreshState" )
342+ self .apply_action ([["setModeTemperature" , "manualMode" , target_temperature ],
343+ ["setDerogation" , target_temperature , "further_notice" ],
344+ ["refreshState" ]])
349345 sleep (20 )
350346
351347 async def _async_heater_turn_on (self ):
352348 """Turn heater toggleable device on."""
353349 if self ._type == "io" :
354- self .apply_action ("setHeatingLevel" , "comfort" )
350+ self .apply_action ([[ "setHeatingLevel" , "comfort" ]] )
355351 elif self ._type == "thermostat" :
356352 self ._apply_action (self .target_temperature )
357353 self ._current_hvac_mode = CURRENT_HVAC_HEAT
@@ -362,7 +358,7 @@ async def _async_heater_turn_on(self):
362358 async def _async_heater_turn_off (self ):
363359 """Turn heater toggleable device off."""
364360 if self ._type == "io" :
365- self .apply_action ("setHeatingLevel" , "off" )
361+ self .apply_action ([[ "setHeatingLevel" , "off" ]] )
366362 elif self ._type == "thermostat" :
367363 self ._apply_action (self .target_temperature )
368364 self ._current_hvac_mode = CURRENT_HVAC_IDLE
@@ -393,10 +389,6 @@ async def async_set_temperature(self, **kwargs):
393389 if temperature is None :
394390 return
395391 self ._target_temp = temperature
396- # if self._type == "thermostat":
397- # self.apply_action(
398- # "setModeTemperature", "manualMode", self.target_temperature
399- # )
400392 await self ._async_control_heating ()
401393 # self.update()
402394
0 commit comments