File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -167,13 +167,14 @@ def _get_location_data(self, loc_id: str) -> GwEntityData:
167167 """
168168 zone = self ._zones [loc_id ]
169169 data = self ._get_zone_data (loc_id )
170- if ctrl_state := self ._control_state (data , loc_id ):
171- if str (ctrl_state ) in ("cooling" , "heating" , "preheating" ):
172- data ["control_state" ] = str (ctrl_state )
173- self ._count += 1
174- if str (ctrl_state ) == "off" :
175- data ["control_state" ] = "idle"
176- self ._count += 1
170+ data ["control_state" ] = "idle"
171+ self ._count += 1
172+ if (ctrl_state := self ._control_state (data , loc_id )) and str (ctrl_state ) in (
173+ "cooling" ,
174+ "heating" ,
175+ "preheating" ,
176+ ):
177+ data ["control_state" ] = str (ctrl_state )
177178
178179 data ["sensors" ].pop ("setpoint" ) # remove, only used in _control_state()
179180 self ._count -= 1
You can’t perform that action at this time.
0 commit comments