Skip to content

Commit 649d9e2

Browse files
committed
Clean up gw_data
1 parent a671852 commit 649d9e2

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

plugwise/smile.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,15 @@ def _all_device_data(self) -> None:
7171

7272
self.gw_devices[device_id] = device
7373

74-
self.gw_data["active_device"] = self._opentherm_device or self._on_off_device
75-
self.gw_data["cooling_present"] = self._cooling_present
76-
self.gw_data["gateway_id"] = self.gateway_id
77-
self.gw_data["heater_id"] = self._heater_id
78-
self.gw_data["single_master_thermostat"] = (
79-
self._is_thermostat and not self._multi_thermostats
80-
)
8174
self.gw_data["smile_name"] = self.smile_name
75+
self.gw_data["gateway_id"] = self.gateway_id
76+
self.gw_data["is_thermostat"] = self._is_thermostat
77+
if self._is_thermostat:
78+
self.gw_data["heater_id"] = self._heater_id
79+
self.gw_data["active_device"] = (
80+
self._opentherm_device or self._on_off_device
81+
)
82+
self.gw_data["cooling_present"] = self._cooling_present
8283

8384
def get_all_devices(self) -> None:
8485
"""Determine the devices present from the obtained XML-data."""

0 commit comments

Comments
 (0)