File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -210,8 +210,7 @@ def _device_data_climate(
210210 device_data ["active_preset" ] = None
211211 self ._count += 2
212212 if presets := self ._presets (loc_id ):
213- presets_list = list (presets )
214- device_data ["preset_modes" ] = presets_list
213+ device_data ["preset_modes" ] = list (presets )
215214 device_data ["active_preset" ] = self ._preset (loc_id )
216215
217216 # Schedule
@@ -228,13 +227,17 @@ def _device_data_climate(
228227 device_data ["mode" ] = "heat"
229228 if self ._cooling_present :
230229 device_data ["mode" ] = "heat_cool"
231- if "regulation_modes" in gateway :
232- if gateway ["select_regulation_mode" ] == "cooling" :
233- device_data ["mode" ] = "cool"
230+ if (
231+ "regulation_modes" in gateway
232+ and gateway ["select_regulation_mode" ] == "cooling"
233+ ):
234+ device_data ["mode" ] = "cool"
234235
235- if "regulation_modes" in gateway :
236- if gateway ["select_regulation_mode" ] == "off" :
237- device_data ["mode" ] = "off"
236+ if (
237+ "regulation_modes" in gateway
238+ and gateway ["select_regulation_mode" ] == "off"
239+ ):
240+ device_data ["mode" ] = "off"
238241
239242 if "None" not in avail_schedules :
240243 loc_schedule_states = {}
You can’t perform that action at this time.
0 commit comments