Skip to content

Commit a28186f

Browse files
committed
Add new constant
1 parent 98d887b commit a28186f

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

plugwise/constants.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,12 @@
391391
NONE: Final = "None"
392392
FAKE_APPL: Final = "aaaa0000aaaa0000aaaa0000aaaa00aa"
393393
FAKE_LOC: Final = "0000aaaa0000aaaa0000aaaa0000aa00"
394+
LEGACY_SMILES: Final[tuple[str, ...]] = (
395+
"smile_thermo_v1",
396+
"smile_v2",
397+
"stretch_v2",
398+
"stretch_v3",
399+
)
394400
LIMITS: Final[tuple[str, ...]] = (
395401
"setpoint",
396402
"lower_bound",

plugwise/smile.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
DEFAULT_TIMEOUT,
2020
DEFAULT_USERNAME,
2121
DOMAIN_OBJECTS,
22+
LEGACY_SMILES,
2223
LOCATIONS,
2324
LOGGER,
2425
MAX_SETPOINT,
@@ -493,7 +494,7 @@ async def _smile_detect(self, result: etree, dsmrmain: etree) -> None:
493494
self.smile_type = SMILES[target_smile].smile_type
494495
self.smile_version = (self.smile_fw_version, ver)
495496

496-
if target_smile in ("smile_thermo_v1", "smile_v2", "stretch_v3", "stretch_v2"):
497+
if target_smile in LEGACY_SMILES:
497498
self._smile_legacy = True
498499

499500
if self.smile_type == "stretch":

0 commit comments

Comments
 (0)