Skip to content

Commit bf0bd29

Browse files
committed
Reduce use of self.smile_version
1 parent 34c2b44 commit bf0bd29

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plugwise/helper.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ def _appliance_info_finder(self, appliance: etree, appl: Munch) -> Munch:
483483
# Find gateway and heater_central devices
484484
if appl.pwclass == "gateway":
485485
self.gateway_id = appliance.attrib["id"]
486-
appl.fw = self.smile_version[0]
486+
appl.fw = self.smile_fw_version
487487
appl.mac = self.smile_mac_address
488488
appl.model = appl.name = self.smile_name
489489
appl.v_name = "Plugwise B.V."
@@ -596,7 +596,7 @@ def _all_appliances(self) -> None:
596596
if self._smile_legacy:
597597
self._appl_data[self._home_location] = {
598598
"class": "gateway",
599-
"fw": self.smile_version[0],
599+
"fw": self.smile_fw_version,
600600
"hw": self.smile_hw_version,
601601
"mac_address": self.smile_mac_address,
602602
"location": self._home_location,
@@ -1289,7 +1289,7 @@ def _get_lock_state(self, xml: str) -> dict[str, Any]:
12891289
data: dict[str, Any] = {}
12901290
actuator = "actuator_functionalities"
12911291
func_type = "relay_functionality"
1292-
if self.smile_type == "stretch" and self.smile_version[1].major == 2:
1292+
if self._stretch_v2:
12931293
actuator = "actuators"
12941294
func_type = "relay"
12951295
appl_class = xml.find("type").text

0 commit comments

Comments
 (0)