File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -130,8 +130,15 @@ async def async_update(self) -> PlugwiseData:
130130 try :
131131 await self .full_xml_update ()
132132 self .get_all_gateway_entities ()
133- # Check for a failed data-retrieval
134- _ = self .gw_entities [self .gw_data ["gateway_id" ]]
133+ # Set self._cooling_enabled -required for set_temperature,
134+ #also, check for a failed data-retrieval
135+ if "heater_id" in self .gw_data :
136+ heat_cooler = self .gw_entities [self .gw_data ["heater_id" ]]
137+ if (
138+ "binary_sensors" in heat_cooler
139+ and "cooling_enabled" in heat_cooler ["binary_sensors" ]
140+ ):
141+ self ._cooling_enabled = heat_cooler ["binary_sensors" ]["cooling_enabled" ]
135142 except KeyError as err :
136143 raise DataMissingError ("No Plugwise data received" ) from err
137144
You can’t perform that action at this time.
0 commit comments