File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -220,22 +220,21 @@ def _device_data_climate(
220220 device_data ["select_schedule" ] = sel_schedule
221221 self ._count += 2
222222
223- # Operation modes: auto, heat, heat_cool
223+ # Operation modes: auto, heat, heat_cool, cool and off
224+ gateway = self .gw_devices [self .gateway_id ]
224225 device_data ["mode" ] = "auto"
225226 self ._count += 1
226227 if sel_schedule == "None" :
227228 device_data ["mode" ] = "heat"
228229 if self ._cooling_present :
229230 device_data ["mode" ] = "heat_cool"
230-
231- # Adam: add off-mode based on regulation_mode = off
232- # or cool-mode for regulation_mode = cooling
233- gateway = self . gw_devices [ self . gateway_id ]
231+ if "regulation_modes" in gateway :
232+ if gateway [ "select_regulation_mode" ] == "cooling" :
233+ device_data [ "mode" ] = "cool"
234+
234235 if "regulation_modes" in gateway :
235236 if gateway ["select_regulation_mode" ] == "off" :
236237 device_data ["mode" ] = "off"
237- if gateway ["select_regulation_mode" ] == "cooling" :
238- device_data ["mode" ] = "cool"
239238
240239 if "None" not in avail_schedules :
241240 loc_schedule_states = {}
You can’t perform that action at this time.
0 commit comments