Skip to content

Commit c81f144

Browse files
committed
Change vendor_* locator formats
1 parent bbefadc commit c81f144

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plugwise/smile.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ def get_all_devices(self) -> None:
133133
# Determine if the Adam or Anna has cooling capability
134134
locator_1 = "./gateway/features/cooling"
135135
locator_2 = "./gateway/features/elga_support"
136-
locator_3 = "./module/vendor_name"
137-
locator_4 = "./module/vendor_model"
136+
locator_3 = "./module[vendor_name='Atlantic']"
137+
locator_4 = "./module[vendor_model='Loria']"
138138
search = self._domain_objects
139139
self._anna_cooling_present = adam_cooling_present = False
140140
if search.find(locator_1) is not None:
@@ -143,8 +143,8 @@ def get_all_devices(self) -> None:
143143
elif search.find(locator_2) is not None:
144144
self._anna_cooling_present = True
145145
# Alternative method for the Anna with Loria/Thermastage
146-
elif search.find(locator_3).text == "Atlantic":
147-
if search.find(locator_4).text in ["Loria", "173"]:
146+
elif search.find(locator_3) is not None:
147+
if search.find(locator_4) is not None:
148148
self._anna_cooling_present = True
149149

150150
self._cooling_present = self._anna_cooling_present or adam_cooling_present

0 commit comments

Comments
 (0)