Skip to content

Commit 051b50c

Browse files
committed
Remove double setting of _smile_legacy
1 parent 0804cf9 commit 051b50c

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

plugwise/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
DEFAULT_TIMEOUT,
2020
DEFAULT_USERNAME,
2121
DOMAIN_OBJECTS,
22-
LEGACY_SMILES,
2322
LOCATIONS,
2423
LOGGER,
2524
MAX_SETPOINT,
@@ -389,7 +388,6 @@ async def _smile_detect_legacy(
389388
network = zb_network.find("./master_controller")
390389
self.smile_zigbee_mac_address = network.find("mac_address").text
391390

392-
self._smile_legacy = True
393391
# Legacy Anna or Stretch:
394392
if (
395393
result.find('./appliance[type="thermostat"]') is not None
@@ -421,6 +419,7 @@ async def _smile_detect_legacy(
421419
)
422420
raise ResponseError
423421

422+
self._smile_legacy = True
424423
return model
425424

426425
async def _smile_detect(self, result: etree, dsmrmain: etree) -> None:
@@ -463,9 +462,6 @@ async def _smile_detect(self, result: etree, dsmrmain: etree) -> None:
463462
self.smile_type = SMILES[target_smile].smile_type
464463
self.smile_version = (self.smile_fw_version, ver)
465464

466-
if target_smile in LEGACY_SMILES:
467-
self._smile_legacy = True
468-
469465
if self.smile_type == "stretch":
470466
self._stretch_v2 = self.smile_version[1].major == 2
471467
self._stretch_v3 = self.smile_version[1].major == 3

plugwise/constants.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,6 @@
9898
"070051": "Switch",
9999
"080029": "Switch",
100100
}
101-
LEGACY_SMILES: Final[tuple[str, ...]] = (
102-
"smile_thermo_v1",
103-
"smile_v2",
104-
"stretch_v2",
105-
"stretch_v3",
106-
)
107101
LIMITS: Final[tuple[str, ...]] = (
108102
"setpoint",
109103
"lower_bound",

0 commit comments

Comments
 (0)