We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 12d2566 commit 2b69b2aCopy full SHA for 2b69b2a
1 file changed
plugwise/smile.py
@@ -130,8 +130,15 @@ async def async_update(self) -> PlugwiseData:
130
try:
131
await self.full_xml_update()
132
self.get_all_gateway_entities()
133
- # Check for a failed data-retrieval
134
- _ = self.gw_entities[self.gw_data["gateway_id"]]
+ # Set self._cooling_enabled -required for set_temperature,
+ #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"]
142
except KeyError as err:
143
raise DataMissingError("No Plugwise data received") from err
144
0 commit comments