Skip to content

Commit b8d16a5

Browse files
committed
Optimize as suggested.
1 parent 1d6b690 commit b8d16a5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plugwise/common.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ def _appl_thermostat_info(self, appl: Munch, xml_1: etree, xml_2: etree = None)
101101
xml_2 = return_valid(xml_2, self._domain_objects)
102102
module_data = self._get_module_data(xml_1, locator, mod_type, xml_2)
103103
appl.vendor_name = module_data["vendor_name"]
104-
if (model := module_data["vendor_model"]) == "ThermoTouch":
105-
appl.model = model
106-
else:
107-
appl.model_id = model
104+
appl.model = module_data["vendor_model"]
105+
if appl.model != "ThermoTouch":
106+
appl.model_id = appl.model
108107
appl.model = check_model(model, appl.vendor_name)
108+
109109
appl.hardware = module_data["hardware_version"]
110110
appl.firmware = module_data["firmware_version"]
111111
appl.zigbee_mac = module_data["zigbee_mac_address"]

0 commit comments

Comments
 (0)