File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
custom_components/panasonic_cc Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 6
6
from homeassistant .util import Throttle
7
7
from homeassistant .const import ATTR_TEMPERATURE
8
8
from homeassistant .helpers .typing import HomeAssistantType
9
+ from homeassistant .components .climate .const import ATTR_HVAC_MODE
9
10
10
11
from .const import PRESET_LIST , OPERATION_LIST
11
12
@@ -126,7 +127,6 @@ def nanoe_mode(self):
126
127
return p ['nanoe' ]
127
128
return None
128
129
129
-
130
130
async def turn_off (self ):
131
131
await self .hass .async_add_executor_job (
132
132
self .set_device ,
@@ -158,11 +158,18 @@ async def set_temperature(self, **kwargs):
158
158
if target_temp is None :
159
159
return
160
160
161
+ new_values = { "temperature" : target_temp }
162
+
163
+ hvac_mode = kwargs .get (ATTR_HVAC_MODE )
164
+ if hvac_mode is not None :
165
+ new_values ['power' ] = self .constants .Power .On
166
+ new_values ['mode' ] = self .constants .OperationMode [OPERATION_LIST [hvac_mode ]]
167
+
161
168
_LOGGER .debug ("Set %s temperature %s" , self .name , target_temp )
162
169
163
170
await self .hass .async_add_executor_job (
164
171
self .set_device ,
165
- { "temperature" : target_temp }
172
+ new_values
166
173
)
167
174
await self .do_update ()
168
175
You can’t perform that action at this time.
0 commit comments